nimbus

Change colors for JProgressBar with Nimbus?

岁酱吖の 提交于 2019-11-28 00:13:52
does anyone know how to change the colors for JProgressBar when you use Nimbus LookAndFeel? I have overridden the whole nimbusOrange -Default Value, which change all ProgressBar-Colors and any other nimbusOrange . (InternalFrame - minimize Button) here with nimbusBase (blue) UIDefaults defaults = UIManager.getLookAndFeelDefaults(); defaults.put("nimbusOrange",defaults.get("nimbusBase")); Better is to write a own Painter and set this to the UIManager via UIManager.put("ProgressBar[Enabled].backgroundPainter", myPainter); If You want to change the Color for only a single ProgressBar instance,

Override Swing Nimbus L&F primary color per component instance

一笑奈何 提交于 2019-11-27 19:54:59
i’m trying to override the “nimbusBase” color for specific instance of JButton/JTabbedPane with no luck. only the specific attributes of the component e.g. “Button.background”, are working. any idea? UIDefaults dialogTheme = new UIDefaults(); // dialogTheme.put(“nimbusBase”, Color.orange); // dialogTheme.put("nimbusBlueGrey", Color.blue); dialogTheme.put("Button.background", Color.yellow); JButton dialogButton = new JButton("North"); dialogButton.putClientProperty("Nimbus.Overrides.InheritDefaults", true); dialogButton.putClientProperty("Nimbus.Overrides", dialogTheme); You can put the Color

Nimbus and alternate row colors

孤街浪徒 提交于 2019-11-27 19:00:55
问题 I don't understand how alternate row coloring works in Nimbus. It seems just crazy!!! I would like to clear things up here. For the demonstration, let's say that we want a JTable that alternate Red and Pink rows (and I don't care which color is the first one). Without redefining custom cellRenderers that perform their own "modulo 2" thing, and without overriding any method from JTable, I want to list the mandatory steps between starting one's application and getting a JTable with custom

setOpaque() in java

天大地大妈咪最大 提交于 2019-11-27 09:20:25
Can anyone explain why Nimbius treats the setOpaque() differently than other java LaF's. Its breaking my code because components that are normally transparent no longer are. EDIT: The problem seems to only deal with JTextAreas (which is what I need) or similar components. EDIT EDIT: This is a screen of the actual application. When applying trashgod's solution, the background still does not show through. EDIT EDIT EDIT: I tried trashgod's suggestion to override the paint(). I toiled with this for hours, and could not get it to work. I was able to get the background to show through, but the

Java / Swing -> Creating a notification JFrame, and the error “The frame is displayable”

风格不统一 提交于 2019-11-27 08:10:11
问题 Ok, I am not that versed in Java / Swing, and I am running into a problem. My application is throwing this error: "Exception in thread "AWT-EventQueue-0" java.awt.IllegalComponentStateException: The frame is displayable." Google isn't turning up much information on this error, and a quick search of StackOverflow is not showing anything yet. What I am trying to do: just implement translucent windows using the code from the tutorials. That's it. I plan to use this as a general window for

TTF and OTF versions of Source Sans Pro are differently displayed in Swing (Nimbus L&F)

折月煮酒 提交于 2019-11-27 07:21:29
问题 ttf: otf: both are the same font but different fontfile types I am running Java 7 in Windows 7 According to Miguel Sousa by Adobe the bug is not in the fonts https://github.com/adobe/source-sans-pro/issues/32#issuecomment-23319673 I am just setting the default font to the new font. The TTF version works without any issues Font font_o = Font.createFont(Font.TRUETYPE_FONT, fonts.class.getResourceAsStream("fonts/TTF/SourceSansPro-Regular.ttf")); //Font font_o = Font.createFont(Font.TRUETYPE_FONT

JTable - Boolean Cell Type - Background

雨燕双飞 提交于 2019-11-27 05:55:13
问题 I'm using the Nimbus L&F with a JTable that has a boolean (checkbox) element as one of its columns. The issue I'm having is that the boolean column does not follow the natural row background alternations present in the Nimbus L&F. 回答1: It's a bug in the synth-installed renderer, quick hack is to force the rendering checkbox opacity to true: ((JComponent) table.getDefaultRenderer(Boolean.class)).setOpaque(true); 回答2: hmmm and I have opposite problem, check that, really nobody can hepl you

Java Nimbus LAF with transparent text fields

二次信任 提交于 2019-11-27 02:17:33
问题 I have an application that uses disabled JTextFields in several places which are intended to be transparent - allowing the background to show through instead of the text field's normal background. When running the new Nimbus LAF these fields are opaque (despite setting setOpaque(false)), and my UI is broken. It's as if the LAF is ignoring the opaque property. Setting a background color explicitly is both difficult in several places, and less than optimal due to background images actually

Change colors for JProgressBar with Nimbus?

半腔热情 提交于 2019-11-26 21:42:29
问题 does anyone know how to change the colors for JProgressBar when you use Nimbus LookAndFeel? 回答1: I have overridden the whole nimbusOrange -Default Value, which change all ProgressBar-Colors and any other nimbusOrange . (InternalFrame - minimize Button) here with nimbusBase (blue) UIDefaults defaults = UIManager.getLookAndFeelDefaults(); defaults.put("nimbusOrange",defaults.get("nimbusBase")); Better is to write a own Painter and set this to the UIManager via UIManager.put("ProgressBar[Enabled

Override Swing Nimbus L&F primary color per component instance

天大地大妈咪最大 提交于 2019-11-26 20:02:08
问题 i’m trying to override the “nimbusBase” color for specific instance of JButton/JTabbedPane with no luck. only the specific attributes of the component e.g. “Button.background”, are working. any idea? UIDefaults dialogTheme = new UIDefaults(); // dialogTheme.put(“nimbusBase”, Color.orange); // dialogTheme.put("nimbusBlueGrey", Color.blue); dialogTheme.put("Button.background", Color.yellow); JButton dialogButton = new JButton("North"); dialogButton.putClientProperty("Nimbus.Overrides