nimbus

Set the button “background” of a Nimbus button

喜欢而已 提交于 2020-01-14 09:00:30
问题 I'm working on an app using the Nimbus Look and Feel. There's a table and one column contains buttons (using the Table Button Column from Rob Camick). That does work, but the result isn't what I had expected. I have tried to fix the look, but to no avail. So the question is: how do I change the "background" (the area outside the rounded rectangle) of a Nimbus button? Preferably in a non-hacky way :-) Using the default Table Column Button, the result looks like this: As you can see, the

Java Swing accordion in Nimbus look and feel

对着背影说爱祢 提交于 2020-01-02 06:51:30
问题 While I was reading Oracle Swing documentation, I came across this example of a set of components displaying the Nimbus Look and Feel named SwingSet3 . I'm new to Swing. Can someone tell me if the accordion in the sidebar is a Swing component or not? 回答1: It is not a standard swing component. You can have a look at the source code for the SwingSet3 demo here. The component on the left is a composite component made out of various other components such as JPanel , JLabel and JButton . There is

Set look and feel color

余生长醉 提交于 2019-12-30 07:28:32
问题 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

Mac Keyboard Shortcuts with Nimbus LAF

瘦欲@ 提交于 2019-12-29 08:48:08
问题 Is there a way to use Nimbus LAF (Look And Feel) on OS X while still being able to use the Meta key for cut/copy/paste and select-all operations? I currently have the following code in my Swing app's main method, which changes up the LAF based on the operating system (default for OS X, Nimbus for all others): if (!System.getProperty("os.name", "").startsWith("Mac OS X")) { try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus"

UIManager strings [duplicate]

大兔子大兔子 提交于 2019-12-24 18:27:41
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Location of String keys in L&F This here is a line in my code: UIManager.getString("FileChooser.saveButtonText", l); This will return a string that represents text printed on save button of JFileChooser Where does it fetch that string from? I tried digging around src.zip, but I couldn't find it... 回答1: have look at (methods are protected, then not accesible from outside) JButton getDefaultButton(JFileChooser fc)

how to change background color for nimbus look and feel using java

做~自己de王妃 提交于 2019-12-23 20:08:39
问题 In Java Swing application, I am trying nimbus look and feel. It looks excellent in JdesktopPane control but i want the different color for my all desktoppane but theme is fine. Is there any way to change the background color of nimbus look and feel? Here is the sample code to apply the nimbus look and feel. try { for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { UIManager.setLookAndFeel(info.getClassName()); break; } } } catch

JTable TableCellRenderer background with NimbusLookAndFeel color problem

时间秒杀一切 提交于 2019-12-23 18:52:06
问题 I'm using NimbusLookAndFeel. With this look and feel JTable's cell background are alternatively white and light grey (it depends on the row number). Now, I'm writing some custom cell renderer implementing TableCellRenderer. I need to set the background of these renderers according to the position of the cell in the JTable. public class MyCellRenderer extends JLabel implements TableCellRenderer{ @Override public Component getTableCellRendererComponent(JTable table, Object value, boolean

JScrollBar don't show thumb in Nimbus L&F

早过忘川 提交于 2019-12-23 16:25:43
问题 I got a problem which only happens on Nimbus L&F. If there are too many items in a JList, the thumb of JScrollBar will disappear. But in metal L&F, the thumb will be always visible, because it has a min size. I have also checked the logic in Nimbus L&F, there does have a same min size. But it not effected. Please see my code below: public static void main(String[] args) { for (UIManager.LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { try {

Table Cell renderer using Nimbus and Scala

廉价感情. 提交于 2019-12-22 10:31:13
问题 I asked this question about a problem I was seing with a cell renderer using the Nimbus look and feel and the issue has turned out to be possibly to do with Scala. Basically I have a cell renderer which extends Panel (as opposed to DefaultTableCellRenderer ) and it is behaving oddly: it is not rendering the alternate row colors properly whereas an equivalent Java program behaves just fine. If anyone is interested, here is some Scala code to run: import com.sun.java.swing.plaf.nimbus

changing how Nimbus LaF handles JTree node highlighting

蓝咒 提交于 2019-12-21 09:39:09
问题 I have been working to transition a Java application from WindowsLookAndFeel to Nimbus, largely successfully, despite Nimbus foibles. My users overall like the Nimbus LaF but didn't like some details, some of which I changed by consulting previous questions on this site. Example: I copied the LeafIcon, ClosedIcon and OpenIcon from Windows LaF (which they liked) and use them in the Nimbus version, for a nice combination of LaFs. Stuck on one last (?) problem. I have a JTree with a subclassed