title image


Smiley Re: Swing Scrollbar Erscheinungsbild verändern?


import javax.swing.plaf.*;

import javax.swing.plaf.metal.*;



public class LightBlueTheme extends DefaultMetalTheme

{

public String getName() { return "LightBlueTheme"; }



private final ColorUIResource primary1 = new ColorUIResource(java.awt.Color.blue);

private final ColorUIResource primary2 = new ColorUIResource(new java.awt.Color(75,160,240));

private final ColorUIResource primary3 = new ColorUIResource(new java.awt.Color(75,160,240));



private final ColorUIResource secondary1 = new ColorUIResource(java.awt.Color.gray);

private final ColorUIResource secondary2 = new ColorUIResource(java.awt.Color.gray);

private final ColorUIResource secondary3 = new ColorUIResource(java.awt.Color.lightGray);





protected ColorUIResource getPrimary1() { return primary1; }

protected ColorUIResource getPrimary2() { return primary2; }

protected ColorUIResource getPrimary3() { return primary3; }



protected ColorUIResource getSecondary1() { return secondary1; }

protected ColorUIResource getSecondary2() { return secondary2; }

protected ColorUIResource getSecondary3() { return secondary3; }

}



MetalTheme theme = new LightBlueTheme();

MetalLookAndFeel.setCurrentTheme(theme);



so ungefähr. allerdings änderst du hiermit die kompletten farbe, nicht nur die scrollbar



gruß,

henrik
gruß, henrik
JavaWiki



geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: