Can we ape the GTK+ 2.0 button style in Java Swing?

前端 未结 1 337
伪装坚强ぢ
伪装坚强ぢ 2020-12-04 03:24

The problem with Java Swing is the look and feels (Metal, Nimbus, GTK...), the worst out there compared to SWT, Windows, Mac and Gnome Tool Kit, and getting good looking wid

相关标签:
1条回答
  • 2020-12-04 04:01

    there are two ways

    • write own JButton

    • but correct way (don't reinvent the wheel) use proper Look and Feel,

    • possible scenario

      1. go to Insubstantial

      2. download code source,

      3. import all classes to the IDE (2-15 min depends of PC HardWare)

      4. search for folder test, there is Check.java,

      5. run that and to try everything in JMenu Look and Feel, required download jar files for every good Custom Java Swing Look and Feels are accesible from JMenu

      6. nothing better around, all standard and good custom Swing's Look and Feel in one JFrame

      7. maybe better would be to use Substance together with SwingX, very good Custom implementation for Custom Swing, again nothing better around

      8. NOTICE: SwingX required more than basic Swing knowledge, Substance (my view) required update and customize some methods in original code too

    0 讨论(0)
提交回复
热议问题