Note that there are some explanatory texts on larger screens.

plurals
  1. POCustom JButton with nimbus
    primarykey
    data
    text
    <p>Hello I am trying to custom the JButton from nimbus and here is what I did :</p> <pre><code>public static void main(String[] args) { // TODO Auto-generated method stub Font police1 = new Font("Tahoma", Font.BOLD, 12); try { for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); UIManager.getLookAndFeelDefaults().put("Button.background",new Color(18,55,63)); UIManager.getLookAndFeelDefaults().put("Button.font", police1); UIManager.getLookAndFeelDefaults().put("Button.textForeground", new Color(122,216,247)); break; } } } catch (Exception e) { // If Nimbus is not available, you can set the GUI to another look and feel. } </code></pre> <p>And here is what I got :</p> <p><img src="https://i.imgur.com/WvYPO.jpg" alt="buttons"></p> <p>As you can see there are some sort of grey border around each button and i am trying to remove it or change its color but I can't find how :( .</p> <p>And once I press on one them I get this :</p> <p><img src="https://i.imgur.com/huCHN.jpg" alt="button pressed"></p> <p>And this is in fact the one wich is the more near to the Color(18,55,63) . is there a way to custom the normal look and the pressed look separatly please ? I checked this link <a href="http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html" rel="nofollow noreferrer">http://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/_nimbusDefaults.html</a> but it could not help me .</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload