0

I'm creating a Java GUI for my application with Netbeans 7.4 GUI Builder, but I'm facing problems with some component's design.

In particular the JRadioButton component at runtime mode is different from the view in preview mode and I don't understand why.

The radio button on the left is what I see in runtime mode.

The other is the one I see in preview mode.

So, could you explain me why the JRadioButton on the left is so irregular and dirty? Is this a bug?

enter image description here

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
andy_X91
  • 15
  • 6
  • 1
    It seems to be using a different pluggable look and feel between design and run-time. See [this answer](http://stackoverflow.com/a/5630271/418556) for the look of some of the PLAFs and code that can flip between them. Add a radio button and you might be able to see the same looks under the different PLAFs. – Andrew Thompson Apr 14 '16 at 09:31
  • Thanks for the answer. It's necessary to set a LAF in a Java GUI application ? – andy_X91 Apr 14 '16 at 11:57
  • *"Thanks for the answer."* Note: it was a comment, not an answer. Answers appear below *"It's necessary to set a LAF in a Java GUI application ?"* Of course not! Not if you don't mind the Java plug-in choosing a PLAF at run-time. ;) But then, you should layout the app. so it is OK for whatever PLAF the user wants to use, then offer them the choice of available PLAFs (if that's important for the app.). – Andrew Thompson Apr 14 '16 at 13:04
  • 1
    OK, I understood. In my Java GUI project there wasn't a set of a LAF. That's why at runtime I see this strange behaviour... I added a setLAF in the beginning of the project and applied some changes in the GUI. The problem of the radio buttons (and other components) now is solved. Thank you! – andy_X91 Apr 15 '16 at 15:53

0 Answers0