Blending Appearance

While I have it

public static void main(String[] args) { try { UIManager.setLookAndFeel("com.sun.java.swing.plaf.nimbus.NimbusLookAndFeel"); UIManager.getBorder("design");//change look and feel here? } catch (Exception e) { JOptionPane.showMessageDialog(null, "Nimbus isn't available"); } javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { design GUI = new design(); GUI.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); GUI.setVisible(true); } }); } 

I'm trying to make the basic look and feel like a halo, but change the border title to windows.

My border is this:

 contentPanel.setBorder(new TitledBorder("Downloader")); 

Can this be done? If it can someone tell me where to look? I'm so confused now.: \

Thanks.

+2
source share
2 answers

I have done it. You must create parts of the user interface, and then call UIManager.setLookAndFeel () to change the appearance and then create other parts. This is more like a hack.

+2
source

When a Component is created, the current LookAndFeel will be used to display this Component .

0
source

Source: https://habr.com/ru/post/1413156/


All Articles