uimanager

Changing the thumb color and background color of a JScrollPane?

浪子不回头ぞ 提交于 2019-12-10 13:08:14
问题 I am having trouble styling a JScrollPane. I just want to be able to change the color of both the thumb and the background (and also remove the increase/decrease buttons). So far I have tried the following: this.setBackground(new Color(0,0,0)); this.viewport.setBackground(new Color(0,0,0)); this.getViewport().setBackground(Color.BLACK); this.setOpaque(false); this.getVerticalScrollBar().setUI(new BasicScrollBarUI() { @Override protected JButton createDecreaseButton(int orientation) { return

Undecorated JDialog border

情到浓时终转凉″ 提交于 2019-12-09 16:55:29
问题 I have a question regarding the border around an undecorated JDialog using the Metal L&F . Look at this picture to see the border that is on this window: I'm trying to figure out how to either get rid of or change the color of the blue border around the very outside of the JDialog . I looked at the UI defaults for the Look & Feel but I wasn't able to come up with any that worked for this. Does anybody have any ideas on how to get rid of that border? Thanks! 回答1: You need to change the Border

How to undecorate JFrame while using jtattoo

落爺英雄遲暮 提交于 2019-12-08 15:20:37
Although a similar question has been asked once before ( how to make frame undecorated after jTattoo theme installed ), but I'm unable to follow the solution to solve the problem. I didn't find the instruction is clear enough and hence failed many tries. I want an undecorated JFrame (and not only on fullscreen mode), but using any of the jtattoo themes unable me to do so. Is there any way I can get my JFrame to be undecorated while using a jtattoo theme? 来源: https://stackoverflow.com/questions/43034911/how-to-undecorate-jframe-while-using-jtattoo

How to undecorate JFrame while using jtattoo

ぃ、小莉子 提交于 2019-12-08 04:58:51
问题 Although a similar question has been asked once before (how to make frame undecorated after jTattoo theme installed), but I'm unable to follow the solution to solve the problem. I didn't find the instruction is clear enough and hence failed many tries. I want an undecorated JFrame (and not only on fullscreen mode), but using any of the jtattoo themes unable me to do so. Is there any way I can get my JFrame to be undecorated while using a jtattoo theme? 来源: https://stackoverflow.com/questions

Java UIManager key list

陌路散爱 提交于 2019-12-07 03:44:58
问题 I've seen people use UIManager to change strings of some pre-created swing components (e.g. JFileChooser). Where can I find some kind of reference that will tell me which strings in which components are changeable, and how can I access them? To clarify: I know that UIManager.put(key, newString); will change text of string that key references to, to "newString" . Where can I find the list of keys? 回答1: These keys are provided by Swing PLAF resource bundles, and you can find them in the JDK

JProgressBar Changing Bar Color dynamically

有些话、适合烂在心里 提交于 2019-12-06 02:34:11
问题 I am using JProgressBar component along with the Nimbus UI Defaults. The problem is that When I want to manually change each progressbar's Bar color, I use BasicProgressBarUI by setting JProgressBar.setUI() function. This makes more trouble because I would like to just change the bar color and it seems that I loose the default look of the jprogressbar (Border, backgroundcolor dissappears). So I can set UIDefaults of Nimbus ProgressBar when the code initializes. It works. But I want to change

Java UIManager key list

无人久伴 提交于 2019-12-05 08:22:50
I've seen people use UIManager to change strings of some pre-created swing components (e.g. JFileChooser). Where can I find some kind of reference that will tell me which strings in which components are changeable, and how can I access them? To clarify: I know that UIManager.put(key, newString); will change text of string that key references to, to "newString" . Where can I find the list of keys? These keys are provided by Swing PLAF resource bundles, and you can find them in the JDK sources. See e.g.: http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/8u40-b25/com/sun

JProgressBar Changing Bar Color dynamically

霸气de小男生 提交于 2019-12-04 07:03:10
I am using JProgressBar component along with the Nimbus UI Defaults. The problem is that When I want to manually change each progressbar's Bar color, I use BasicProgressBarUI by setting JProgressBar.setUI() function. This makes more trouble because I would like to just change the bar color and it seems that I loose the default look of the jprogressbar (Border, backgroundcolor dissappears). So I can set UIDefaults of Nimbus ProgressBar when the code initializes. It works. But I want to change each progressbar's bar color dynamically. Is there any other way of changing Bar color of JProgressBar

Undecorated JDialog border

本秂侑毒 提交于 2019-12-04 05:13:20
I have a question regarding the border around an undecorated JDialog using the Metal L&F . Look at this picture to see the border that is on this window: I'm trying to figure out how to either get rid of or change the color of the blue border around the very outside of the JDialog . I looked at the UI defaults for the Look & Feel but I wasn't able to come up with any that worked for this. Does anybody have any ideas on how to get rid of that border? Thanks! camickr You need to change the Border of the root pane: getRootPane(). setBorder( BorderFactory.createLineBorder(Color.RED) ); If you want

What are the UIManager keys for JFileChooser and FileDialog?

大兔子大兔子 提交于 2019-12-02 13:48:24
问题 I want to use the UIManager.get method in order to get and save the system look and feel for JFileChooser and FileDialog and then I want to change the look and feel. The problem is that I don't know what are the keys for Swing components that UIManager.get method uses. Is there any reference or any convention for that? Thanks 回答1: UIManager Defaults 来源: https://stackoverflow.com/questions/3974743/what-are-the-uimanager-keys-for-jfilechooser-and-filedialog