-
Problem with Images...
Hi i am new to java... i want to make a display an image of a ball in png format.. the program will be animated i.e the ball will move.. the display will be in a window.. the program is a console app not an applet.. The ball is a separate class... the window will be created by a separate class(main class)... Can you please help me.. i am gettin the initial window but cannot display the ball..the initial winow is from a class using JFrame... thanks in advance
-
A very short design suggestion:
Make a JPanel extension, override the paintComponent method and draw the ball there. Stuff this panel into the JFrame, implement a thread in the JPanel extension. In its run method you code a loop/sleep that increments the ball coordinates as appropriate and repaints the panel on each loop.
eschew obfuscation
Similar Threads
-
By James Graham in forum .NET
Replies: 2
Last Post: 03-17-2002, 08:36 PM
-
By palash kasodhan in forum Java
Replies: 1
Last Post: 11-13-2001, 10:49 AM
-
Replies: 0
Last Post: 10-29-2001, 01:55 PM
-
By substring in forum VB Classic
Replies: 2
Last Post: 07-24-2001, 02:29 PM
-
By Michael Shutt in forum XML
Replies: 0
Last Post: 06-26-2001, 11:51 AM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks