Results 1 to 2 of 2
  1. #1
    xael is offline Member
    Join Date
    Sep 2010
    Posts
    31
    Rep Power
    0

    Default GUI and JPanel in the same window... basic problem.

    Hello,
    I'm making a java game, where the game screen (what's drawn) is in a single Jpanel class that I add to a JFrame class, my main game window. I'd like to be able to use swing GUI buttons, etc in the same window. Not on top of the JPanel, but inside the window along the edges. But when I try to have both on the screen, the JPanel is reduced to a single pixel in size. How do I draw both the JPanel and the GUI in the same window (JFrame)? Thanks

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

    Default

    Likely you're using the wrong layout managers. You haven't created this app using NetBeans drag-and-drop GUI builder have you? If so, that's probably a main problem that needs to be fixed.

    Luck

Similar Threads

  1. Basic Java GUI problem, JPanel not resizing.
    By Cemi in forum New To Java
    Replies: 10
    Last Post: 04-11-2010, 01:20 AM
  2. Problem resizing JPanel on window resize
    By Nyet in forum AWT / Swing
    Replies: 4
    Last Post: 11-27-2009, 03:13 AM
  3. Triangles java problem (basic help)
    By adz06 in forum New To Java
    Replies: 5
    Last Post: 10-31-2009, 06:58 PM
  4. What am I doing wrong in this basic problem
    By Blaedel in forum New To Java
    Replies: 10
    Last Post: 10-11-2009, 07:45 PM
  5. [SOLVED] very basic java problem
    By sales1 in forum New To Java
    Replies: 13
    Last Post: 08-20-2008, 08:33 PM

Posting Permissions

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