Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top