2

My Swing Application's GUI is built using Window Builder Pro GUI editor. Layouts used are MigLayout and AbsoluteLayout. Application is developed using Windows Machine, So UI is well aligned and neat in Windows, but when I run the same application in Mac OS X, Application's Frame couldn't accommodate the components inside its bounds. I mean, size of Components inside the frame changes across platforms. When I give extra space(Increased frame bounds), it looks nice in Mac but weird in Windows. Is there any way to have Frame or Panel to grow with respect to its contents or Components.

tshepang
  • 12,111
  • 21
  • 91
  • 136
Ahamed
  • 39,245
  • 13
  • 40
  • 68

2 Answers2

4

Don't use the absolute layout. Layout managers are used precisely to avoid the kind of problems that you're facing.

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255
1

Assuming you used AbsoluteLayout because none of the existing layout managers suited your needs,

Have a look at Creating a Custom Layout Manager and use one instead of AbsoluteLayout.(Before that make sure none of the present layout managers suit your need)

COD3BOY
  • 11,964
  • 1
  • 38
  • 56
  • - I dont' like the color of my car; - Here's a brief guide on how to build your own car paint factory so you can create the color you want! – Denis Tulskiy Jan 31 '12 at 08:36
  • @DenisTulskiy I specified, Do this only in case you dont want to use ANY OF THE EXISTING COLOUR for your car :) Do you have any other option?? – COD3BOY Jan 31 '12 at 08:40