Results 1 to 3 of 3
  1. #1
    The_Capn is offline Member
    Join Date
    Jun 2011
    Posts
    2
    Rep Power
    0

    Default Drawing issue with Applet/Swing

    Hey guys,

    I'm creating a Java Swing based Battleship game currently. Well... its already written but I made a few modifications to my code and am now experiencing issues, let me explain.

    I wrote a fully functional game and it worked 100%. I recently reformatted my PC and put Eclipse back on it and am in the process of updating the AI (I haven't touched the GUI code) but am now experiencing issues with the applet running from Eclipse.

    When the game runs I get a properly drawn screen: <REMOVED>
    As soon as any mouse event occurs the screen redraws with garbage: <REMOVED>

    Is this a common issue? I don't write many GUI applications with Java. I'll assume something is incorrect with my configuration because the code has worked 100% in the past.

    If you need me to post any info please let me know!
    The_Capn
    Last edited by The_Capn; 06-18-2011 at 06:31 AM.

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

  3. #3
    The_Capn is offline Member
    Join Date
    Jun 2011
    Posts
    2
    Rep Power
    0

    Default

    I've embedded the applet in an html file and it runs fine (besides the errors I've introduced) so I'm 99% sure its not a code issue with the GUI. I'd like to thank you for your speedy reply Fubarable but since this appears to be a configuration issue with Eclipse I'll jump towards an Eclipse forum for further guidance.

Similar Threads

  1. Minor AWT drawing issue
    By snaquetime in forum New To Java
    Replies: 6
    Last Post: 06-02-2011, 01:01 AM
  2. Drawing a selection box using swing
    By edi233 in forum AWT / Swing
    Replies: 6
    Last Post: 05-09-2011, 04:16 PM
  3. drawing images in swing
    By owboateng in forum New To Java
    Replies: 3
    Last Post: 05-09-2011, 03:27 PM
  4. Applet drawing before visible
    By CoderMan in forum Java Applets
    Replies: 3
    Last Post: 07-02-2010, 12:27 AM
  5. Drawing Applet
    By Urgle in forum New To Java
    Replies: 6
    Last Post: 11-19-2008, 09:38 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •