简体   繁体   中英

UI Change in Swing application across platforms

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 .

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

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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM