Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
I've got an awt frame which is set to BorderLayout(0,0) and I've got a panel in the "North" and "Center". When I call setResizable(false) on this frame, I get a 1 pixel margin on the right side. Why is this happening? I'm using JDK 1.3.1 on Win. Thanks, Drew
If your using borderlayout this means you are extending JFrame, try this code: BorderLayout layout = new BorderLayout(0,0); Container c = getContentPane(); c.setLayout(layout); JPanel p1,p2; p1 = new JPanel(); p2 = new JPanel(); Now whatever you like to add to p1 and p2 add them and after that write: c.add(p1, BorderLayout.NORTH); c.add(p2, BorderLayout.CENTER); But make sure first you add all your components like buttons, comboboxes, whatever on the right Layout, but take care that whatever component you want on the North or Center borderlayout you SHOULD put them on panel1 ( p1 ) and panel2 ( p2). I don't know what you have done , it may be what i already said you didn't explain exactly what you did hope that would help .. good luck
No he could still be using AWT... AWT still uses BorderLayout.
Though that still doesn't explain why it happens... I don't see this on JDK 1.4.1_01 on my Win2K box... but I may just not be looking closely enough. How did you detect the 1 pixel difference? Through code (one of the sizing methods), or visual inspection?
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Onion rings are vegetable donuts. Taste this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss