Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
implements
- Page 1
Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
3 Weeks Ago
by jprog1000
….Graphics; import java.awt.Color; public class BallPanel extends JPanel
implements
ActionListener { private int delay = 10; protected Timer timer; Ball b…
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by toneewa
….ArrayList; import java.util.Arrays; public class BallPanel extends JPanel
implements
ActionListener { private static final int delay = 16; protected Timer timer…
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by toneewa
….ArrayList; import java.util.Arrays; public class BallPanel extends JPanel
implements
ActionListener { private static final int delay = 1; protected Timer timer…
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by jprog1000
Thank you so much for your reply and additions! It is certainly working as I wanted. I will read through the code you have added and ask you any questions I might have. I hope you don't mind. Regards
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by Dani
I’ll mark this question solved :)
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by Dani
… oh, sorry, missed the bit about you still needing clarifications. Feel feee to ask :) I’ll now unmark this topic as solved. /facepalm
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by jprog1000
Hello, Thank you again so much! All your additions are clear, but it seems like whenever two balls collide, more than one ball is added to the arraylist and painted. Any way to have just one ball added to the panel for every collision? Have some kind of a toggle flag in paintcomponent? Regards
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
2 Weeks Ago
by toneewa
Yes, this is true. Overlapping ball spawns can do that causing a chain reaction. Something like that could be done. How you handle the spawning of the new ball is what I played with a bit before. You will see better collision detection changing to: g.fillOval(ball.getX(), ball.getY(), 1 * ball.getRadius(), 1 * ball.getRadius());
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by jprog1000
Got it. Thank you so much!
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by vortex_1
In my opinion, implementing a feature in a bouncing balls simulation where a new ball is created when two balls collide can add an interesting and dynamic element to the simulation. This feature can introduce a sense of complexity and unpredictability, making the simulation more engaging and challenging for users. It could also provide an …
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by jprog1000
Great reply, vortex! Agree with all your points.
Re: Bouncing Balls: Creating a new ball when two balls collide
Programming
Software Development
1 Week Ago
by aishamushtaq
Hi, Its helpful for me. I got my answer.
Paris Olympics Chatbot- Get Ticket Information Using Chat-GPT and LangChain
Programming
Computer Science
1 Month Ago
by usmanmalik57
… the `document_chain,` which returns the final response. The following script
implements
the method to generate the final response. ``` def generate_response(query…
Re: A reliable way of detecting AI content?
Hardware and Software
Cloud-based Apps
1 Month Ago
by jkon
… AI generated texts but I don't know anyone that
implements
them yet. In images they do it (e.g. DALL…
Interface ... extends ... implements ... (Need help)
Programming
Software Development
16 Years Ago
by balgarath
…import java.rmi.RemoteException; public interface ToyStore extends Remote
implements
Observer { String sayHi() throws RemoteException; public void …import java.rmi.RemoteException; public interface ToyFactory extends Remote
implements
Observable { String sayHello() throws RemoteException; public void addObserver…
'[Class] is not abstract..' error when i use 'implements'
Programming
Software Development
19 Years Ago
by javaLearner
…getting the following error when i declare anything that '
implements
'. i remove the declarations and all subsequent code …in java.awt.event.ActionListener public class ChatClientApplication extends Frame
implements
ActionListener, Item Listener, WindowListener ^ 1 error ***********************END_OF_ERROR********************** Cheers…
Re: '[Class] is not abstract..' error when i use 'implements'
Programming
Software Development
19 Years Ago
by cosi
…) in java.awt.event.ActionListener public class ChatClientApplication extends Frame
implements
ActionListener, Item Listener, WindowListener ^ 1 error ***********************END_OF_ERROR********************** Cheers.. :eek:[/QUOTE…
Re: '[Class] is not abstract..' error when i use 'implements'
Programming
Software Development
19 Years Ago
by javaLearner
… not 'constructing' correctly??, i.e. public class ChatClientApplication extends Frame
implements
ActionListener, ItemListener, WindowListener and then: //Class constructor method.. public ChatClientApplication…
extends JFrame implements KeyListener
Programming
Software Development
15 Years Ago
by TheWhite
….JFrame; import javax.swing.SwingUtilities; public class Testing extends JFrame
implements
KeyListener{ public static void main(String[] args){ SwingUtilities.invokeLater(new…
Re: extends JFrame implements KeyListener
Programming
Software Development
15 Years Ago
by cbalu
….JFrame; import javax.swing.SwingUtilities; public class Testing extends JFrame
implements
KeyListener{ public static void main(String[] args){ SwingUtilities.invokeLater(new…
Error in Implements on Java ME
Programming
Mobile Development
14 Years Ago
by Nathan Campos
….rms.*; import javax.microedition.lcdui.*; public class simplecontacts extends MIDlet
implements
CommandListener, ItemStateListener { private Display display; private Alert alerta; private Form…
write a C language program that implements the main functions of maintenance
Programming
Software Development
13 Years Ago
by albanosali
…;EMAIL SNIPPED> /// To write a C language program that
implements
the main functions of maintenance of student information. To maintain…
Define a class which implements arithmetic with arbitrary precision
Programming
Software Development
13 Years Ago
by svatstika
… this book. One of them is: define a class, which
implements
arithmetic (+, -, /, *) with arbitrary precision. This is a new type with…
Extending a class that extends a class and implements an interface
Programming
Software Development
10 Years Ago
by Pyler
… class KellyCoffee<Order extends Queue<Order>>
implements
OrderLineInterface{} Now when I try to implement `CheckOut` public class…
Re: Extending a class that extends a class and implements an interface
Programming
Software Development
10 Years Ago
by Tarek_2
Hi, `private class KellyCoffee<Order> extends Queue
implements
OrderLineInterface` Otherwise, the declaration seems wrong : a class can't extend herself.
Re: Interface ... extends ... implements ... (Need help)
Programming
Software Development
16 Years Ago
by masijade
An interface cannot implement anything, since an interface is not an implementation. An interface can only extend interfaces (exactly one). Edit: PS If you are a David Eddings fan, it is spelled Belgarath not Balgarath. If not, then please ignore.
Re: Interface ... extends ... implements ... (Need help)
Programming
Software Development
16 Years Ago
by balgarath
Thanks a lot...I didn't really need the Observer/Observable files anyway I can just make ToyFactory and ToyStore require those methods. David Eddings fan - yes, great books. I spelled it that way on purpose, used that name in Ultima Online years ago and it kind of stuck.
Re: Interface ... extends ... implements ... (Need help)
Programming
Software Development
16 Years Ago
by masijade
[QUOTE=balgarath;464616]David Eddings fan - yes, great books. I spelled it that way on purpose, used that name in Ultima Online years ago and it kind of stuck.[/QUOTE] Just wanted to check that that was what it looked like. ;-)
Re: '[Class] is not abstract..' error when i use 'implements'
Programming
Software Development
19 Years Ago
by cosi
Don't have the .class at the end. Just run the line java ChatClientApplication Hope this helps. ;-) Ed [QUOTE=javaLearner]Hi Ed, that's brilliant! Thankyou, code compiles now.. -> ha! So now of course I attempt to run it and get: ---------------------------------------------------------------------- [COLOR=Red][I]C:\Java …
Re: '[Class] is not abstract..' error when i use 'implements'
Programming
Software Development
19 Years Ago
by javaLearner
Good point, thankyou Ed. Turns out I did not have my CLASSPATH environment variable set correctly ([FONT=Courier New][COLOR=Gray]set CLASSPATH=[/COLOR][/FONT]), so class files could not be found and nothing was able to run.. Thanks for help anyway.. :-|
1
2
3
17
Next
Last
Search
Search
Forum Categories
Hardware/Software
Programming
Digital Media
Community Center
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Meet People
Forums
Top Members
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2024 DaniWeb® LLC