| Issue 71: | Can not set the size of a JFrame | |
| 1 person starred this issue and may be notified of changes. | Back to list |
1. Setup XML with following value to create a JFrame <frame size="640,480"> </frame> 2. Parse the file as aplication: ... JFrame frame = swingApplication.render(this, "swixml/mainFrame.xml"); show(frame); ... Result: The size settings are overwritten by the renderer. Workaround, set the size after show: ... show(frame); frame.setSize(new Dimension(500, 400)); ... Systeminfo: Swixml: 2.5-SNAPSHOT build from SVN revision 1032 System: Ubuntu 10.04 64Bit Java: Sun 1.6.0_26-b03 64bit
Sep 8, 2011
Project Member
#1
bartolom...@gmail.com
Status:
Started
Sep 8, 2011
Hi The problem is that, show() method, performs .pack() that resets the size to the preferred size the solution is to specify also the preferredSize <frame size="640,480" preferredSize="640,480"> </frame>
Status:
Fixed
|