Results 1 to 5 of 5
  1. #1
    Atriamax is offline Member
    Join Date
    Sep 2009
    Posts
    41
    Rep Power
    0

    Default Thread Frames, and Graphics

    Until now ive only done applets, now Im trying to create Applications with frames. I am getting really frustrated with it. I want it to have a main frame that has all the graphics which need to be updated several times a second. Im confused where i put my thread and my paint(g) method. right now i have my main class with my static main function and another class that extends frame for the frames. Where do i Put the Thread and where do i Draw my graphics??

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    use Swing (JFrames, JPanels), not AWT (Frames, Panels), and go through the Sun Swing tutorials which will show you how to paint. Animation can be done simply with a Swing Timer (again have a look at the tutorials -- it's all there). Much luck!

  3. #3
    Atriamax is offline Member
    Join Date
    Sep 2009
    Posts
    41
    Rep Power
    0

    Default

    Alright looks like Im going to have to buckle down and learn Swing. generally speaking, Is awt better for simple applets and swing better for more complex applications? (i Know its not that simple, i just didnt even know about swing until i was comfortable with awt.)

  4. #4
    Atriamax is offline Member
    Join Date
    Sep 2009
    Posts
    41
    Rep Power
    0

    Default

    ahhhhh i did some research, I learned awt, swt and swing are just different versions of the GUI, so i really should switch to the latest version! (swing of course)
    Im going to try NetBeans instead of eclipse too, any tips?

  5. #5
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    8

Similar Threads

  1. navigation b/w frames
    By imrankhan in forum AWT / Swing
    Replies: 3
    Last Post: 03-19-2012, 01:25 PM
  2. Frames, messageDialog vs Applets
    By mgm2010 in forum New To Java
    Replies: 2
    Last Post: 08-31-2009, 06:31 AM
  3. panes, frames and ddm's :|
    By skatefreak in forum New To Java
    Replies: 1
    Last Post: 08-09-2009, 11:21 AM
  4. Help regarding Frames
    By ramesh.8189 in forum AWT / Swing
    Replies: 14
    Last Post: 02-15-2009, 09:12 AM
  5. Grid layout frames GUI
    By fritz1474 in forum AWT / Swing
    Replies: 1
    Last Post: 10-15-2008, 03:04 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
  •