look-and-feel

Override default look and feel Java

拈花ヽ惹草 提交于 2019-12-01 06:41:33
I want to override java look and feel. I just want to show the buttons differently. I want all the features of Windows Look and Feel but only buttons differently. I hope you get my point. Color color = new Color(220, 220, 220, 200); UIManager.put("OptionPane.background", color); UIManager.put("Panel.background", color); UIManager.put("Button.foreground", new Color(255, 255, 255, 255)); List<Object> gradients = new ArrayList<Object>(5); gradients.add(0.00f); gradients.add(0.00f); gradients.add(new Color(0xC1C1C1)); gradients.add(new Color(0xFFFFFF)); gradients.add(new Color(0x5C5D5C));

UI properties does not contain some keys

元气小坏坏 提交于 2019-12-01 06:04:12
I have the following problem. I need to get an UI properties: UIManager.getString("OptionPane.okButtonText") that returns the string "OK" , and it works. However, if I iterate through the UIDefaults keyset, I never get the key "OptionPane.okButtonText" . Does anyone know why it happens? I get the UIDefaults in three different way ( UIManager.getDefaults() , UIManager.getLookAndFeel().getDefaults() and UIManager.getLookAndFeelDefaults() ), but no one of these work. Edit : I also find this list of properties of the class JFileChooser , that contains some properties that do not appear int the

how to make frame undecorated after jTattoo theme installed

[亡魂溺海] 提交于 2019-12-01 05:59:09
问题 after using jTattoo LookAndFeel, try { UIManager.setLookAndFeel(new McWinLookAndFeel()); new Main(new UserModel()).setVisible(true); } catch (UnsupportedLookAndFeelException ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null,ex); } } i still want to make all the frames undecorated.i tried to use this.undecorated(true); in constructor of my frame but these codes won't work since the look and feel overrides these codes, can anyone tell me how to go above this?? any help would

How to change the default font size in the Swing GTK LookAndFeel?

删除回忆录丶 提交于 2019-12-01 05:58:09
Is there a way to change the default font size in the Swing GTK LaF? The GTK LaF seems to assume 72dpi, so all the fonts are only 3/4 of the size they should be when using a 96dpi screen. See this Fedora bug for details. I'd like to find a workaround in the meantime, while I wait for the fix. I've already tried resetting the font size via UIDefaults , as recommended here , for example, but (as also noted there) the GTK LaF appears to ignore this. I could build a widget factory that would also set the desired font size for creating all of my Swing widgets, but that's going to be massively

Override default look and feel Java

你。 提交于 2019-12-01 05:03:04
问题 I want to override java look and feel. I just want to show the buttons differently. I want all the features of Windows Look and Feel but only buttons differently. I hope you get my point. Color color = new Color(220, 220, 220, 200); UIManager.put("OptionPane.background", color); UIManager.put("Panel.background", color); UIManager.put("Button.foreground", new Color(255, 255, 255, 255)); List<Object> gradients = new ArrayList<Object>(5); gradients.add(0.00f); gradients.add(0.00f); gradients.add

How to change the look and feel of a single part of a java program

馋奶兔 提交于 2019-12-01 03:07:34
问题 So I'm making a program selection tool, and currently i like the way everything looks with just the java look and feel. the only thing i want to change is the JFileChooser look and feel to Windows. When i call the filechooser and tell it to change the look and feel then, it doesn't do anything. when i call it when the program starts, it makes the buttons look crappy. so google doesn't have anything, and i cant figure out how to get this to work. please help! let me know what code would be

UI properties does not contain some keys

怎甘沉沦 提交于 2019-12-01 02:58:41
问题 I have the following problem. I need to get an UI properties: UIManager.getString("OptionPane.okButtonText") that returns the string "OK" , and it works. However, if I iterate through the UIDefaults keyset, I never get the key "OptionPane.okButtonText" . Does anyone know why it happens? I get the UIDefaults in three different way ( UIManager.getDefaults() , UIManager.getLookAndFeel().getDefaults() and UIManager.getLookAndFeelDefaults() ), but no one of these work. Edit : I also find this list

Set look and feel color

时光毁灭记忆、已成空白 提交于 2019-12-01 00:50:23
I'm using the Nimbus Look & Feel within my Java Swing application. The L&F looks great, but i need to change some settings (Fonts, Colors, ... ) to fit the corporate identity of my firm. The following code sets the L&F of the whole application: try { for( LookAndFeelInfo info : UIManager.getInstalledLookAndFeels() ) { if( "Nimbus".equals( info.getName() ) ) { UIManager.setLookAndFeel(info.getClassName()); customizeNimbusLaF(); break; } } } catch( Exception e ) { LogUtility.warning( "cannot set application look and feel" ); LogUtility.warning( e.getMessage() ); } The code does, what it is

Is there a way to have the Nimbus Look&Feel render its own windows decorations for a top level JFrame?

谁都会走 提交于 2019-12-01 00:20:11
Is there a way to have the Nimbus Look&Feel render its own windows decorations for a top level JFrame ? I've been digging through the Internet, and I'm starting to suspect it might not be possible at all. Has anyone actually succeeded with (and cared about) that? Nimbus decorations are nice and neat for internal frames , but apparently there is no way to have the same effect on JFrame s and JDialog s. I tried nimbusx (Nimbus Extensions), a library that subclasses JFrame and JDialog and allegedly applies nimbus-styled decorations to them (then you just have to instantiate nimbusx classes

Nimbus TableHeader was not highlighted as 'pressed'

萝らか妹 提交于 2019-11-30 20:39:30
The JTableHaeder has no 'pressed' highlighting by default. (Nimbus) NimbusDefaults says it has a default [Pressed] background painter. What should I do, to see this when i click on the TableHeader? UPDATE 1 The NimbusStyle.getExtendedState returns the PRESSED on mouseDown correctly. But the NimbusStyle.getBackgroundPainter(SynthContext) returns null cause there is an null in the NimbusStyle.Values cache for the CacheKey "backgroundPainter$$instance" with this state. What is wrong there? UPDATE 2 My example shows a JTableHeader and a JScrollBar with an 'Pressed Behavior'. For the JScrollBar my