Win a copy of Secure Financial Transactions with Ansible, Terraform, and OpenSCAP this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

AWT frame is not rendered as it should be in latest Java 8 version

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A strange AWT bug (?) occurred when I upgraded to the latest Java 8 version, which is 1.8.0_271 according to the information given when I type java -version in the DOS box.


I have a class MainWindow in a package called gui, and the source looks like this:



The full code is available at http://jogja.nl/source/src.zip

Now the "mainFrame" consists of a "drawingPanel" and a "controlPanel" as can be seen above. A flow layout is used to put these two panels from left to right and I use the pack() and setVisible() methods as they should be used.

Previously this produced the correct result, see the file old_java_version.jpg
But now I get a window (frame) which is just not large enough to contain the two panels it seems, see latest_java_version.jpg

The problem occurs on both Windows 7 and Windows 10.

Is this a bug?
Should I fix this?
How?

Thanks so much,
Pim
old_java_version.jpg
[Thumbnail for old_java_version.jpg]
latest_java_version.jpg
[Thumbnail for latest_java_version.jpg]
 
Marshal
Posts: 72478
315
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

Why are you using AWT components? I thought they were obsolete. I also thought they are heavyweight components. so their rendering depends more on the OS than on the version of Java® you are using.
 
Are you okay? You look a little big. Maybe this tiny ad will help:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic