aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes JPanel - Screen Size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JPanel - Screen Size" Watch "JPanel - Screen Size" New topic

JPanel - Screen Size

rama krishnan
Ranch Hand

Joined: Mar 14, 2008
Posts: 68
How to automatically resize the JPanel on the browser using JApplet based on Screen Size

Rob Spoor

Joined: Oct 27, 2005
Posts: 19542

First of all, you'll need to make sure your panel will use the entire JApplet size. Since JApplet uses a BorderLayout by default, that's not a problem. Just add the panel to the center of the JApplet (using BorderLayout.CENTER).

Now secondly, you'll need some Javascript to resize the applet space inside your HTML as well. Let me know if you have the first part figured out, I'll then move this thread to the HTML forum.

How To Ask Questions How To Answer Questions
It is sorta covered in the JavaRanch Style Guide.
subject: JPanel - Screen Size
Similar Threads
how to set the size of of a JPanel according to the Screen Size
panel in JScrollPane-urgent
Resizing issues in JTree
jpeg in a Jpanel
Help me out in Thread