In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article will explain in detail how to use the Swing appearance code for you. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.
It is easy for Swing applications to switch between open source Look&&Feel, but there is a problem when switching applications to the system default or native Swing look and feel under the open source look and feel. Either there is no title bar, or the appearance of the title bar has not changed, using the window decoration of the system. This is due to the addition of a line of code to the main method when the application starts:
JFrame.setDefaultLookAndFeelDecorated (true)
Swing appearance:
Package org.personal.bean; import javax.swing.JFrame; import javax.swing.UIManager; / / Test package import org.jvnet.substance.SubstanceLookAndFeel; import org.jvnet.substance.theme.SubstanceOrangeTheme; public class Start {/ / initial skin public Start () {try {UIManager.setLookAndFeel (new SubstanceLookAndFeel ());} catch (Exception ex) {ex.printStackTrace ();} SubstanceLookAndFeel.setCurrentTheme (new SubstanceOrangeTheme ()) } public static void main (String [] args) {new Start (); new JFrame (); / / new LoginFrame (); / / Test login interface / / new MainFrame (); / / new StockPileDAO () .initData () / / Test insert data}} this is the end of the article on "how to use Swing appearance code". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.