From: Snowdog <sn...@ga...> - 2006-04-11 05:39:12
|
NeoSkye wrote: > I'm a bit confused about the suggestion for a pack() > call. When do components get cut off? what components? > sorry, just really confused there. But I will > definately work on the hide/show feature. OSX shows this effect more dramatically than XP but here is an image with the 'cut off' areas pointed out with red arrows. http://rpg.game-edit.org/orpg/screenshot1.jpg On OSX the frame cuts off the popup window roughly though the middle of the text line. I can get you a screenshot of that tomorrow if you'd like. In case you don't know pack() resizes containers so they fit the minimum size of its components. See the difference for yourself... Add "newframe.pack();" at line 53 in MDIFrame (as of SVN revision 53) as shown below.... public void addModule(String modulename, JPanel modulepanel) { JInternalFrame newframe=new JInternalFrame( modulename, true, false, true, true); newframe.setSize(modulepanel.getPreferredSize().width+10, modulepanel.getPreferredSize().height+20); newframe.getContentPane().add(modulepanel); > newframe.pack(); mainPane.add(newframe); newframe.setVisible(true); } This is one of those things I'd usually commit without delegation but, being as you asked I figured I'd oblige. |