本文整理了Java中javax.swing.UIManager.getSystemLookAndFeelClassName()
方法的一些代码示例,展示了UIManager.getSystemLookAndFeelClassName()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。UIManager.getSystemLookAndFeelClassName()
方法的具体详情如下:
包路径:javax.swing.UIManager
类名称:UIManager
方法名:getSystemLookAndFeelClassName
暂无
代码示例来源:origin: stackoverflow.com
JFrame f = new JFrame("Frame " + ii);
f.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
String s =
"os.name: " + System.getProperty("os.name") +
"\nos.version: " + System.getProperty("os.version");
f.add(new JTextArea(s,3,28)); // suggest a size
f.pack();
f.setVisible(true);
public void run() {
try {
UIManager.setLookAndFeel(
UIManager.getSystemLookAndFeelClassName());
} catch (Exception useDefault) {}
initGui();
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
logger.warning("Could not set native look and feel.");
this.getContentPane().add(mainPanel);
代码示例来源:origin: stackoverflow.com
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
代码示例来源:origin: jzy3d/jzy3d-api
public JFrame newFrame(JPanel panel) {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
// ignore failure to set default look en feel;
}
JFrame frame = new JFrame();
frame.add(panel);
frame.pack();
frame.setVisible(true);
return frame;
}
代码示例来源:origin: UISpec4J/UISpec4J
public static void show(Window window) throws Exception {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
window.pack();
window.setVisible(true);
}
代码示例来源:origin: stackoverflow.com
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
JFrame frame = new JFrame("Testing");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLayout(new BorderLayout());
frame.add(new TestPane());
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
代码示例来源:origin: RipMeApp/ripme
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | UnsupportedLookAndFeelException | IllegalAccessException e) {
LOGGER.error("[!] Exception setting system theme:", e);
gbc.gridy = 0; pane.add(ripPanel, gbc);
gbc.gridy = 1; pane.add(statusPanel, gbc);
gbc.gridy = 2; pane.add(progressPanel, gbc);
gbc.gridy = 3; pane.add(optionsPanel, gbc);
gbc.weighty = 1;
代码示例来源:origin: kaikramer/keystore-explorer
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
java.awt.EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
DGenerateKeyPair dialog = new DGenerateKeyPair(new JFrame(), KeyStoreType.JKS, KeyPairType.RSA, 1024);
dialog.addWindowListener(new java.awt.event.WindowAdapter() {
@Override
public void windowClosed(java.awt.event.WindowEvent e) {
System.exit(0);
}
});
dialog.setVisible(true);
}
});
}
}
代码示例来源:origin: UISpec4J/UISpec4J
public static void show(Window window) throws Exception {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
window.pack();
window.setVisible(true);
}
代码示例来源:origin: stackoverflow.com
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
JFrame window = new JFrame();
window.setSize(840, 560);
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.add(grid);
window.setVisible(true);
grid.fillCell(0, 0);
grid.fillCell(79, 0);
代码示例来源:origin: igniterealtime/Openfire
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
frame.getContentPane().add(mainPanel, BorderLayout.CENTER);
frame.pack();
代码示例来源:origin: kaikramer/keystore-explorer
public static void main(String[] args) throws Exception {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
final KeyPair keyPair = KeyPairUtil.generateKeyPair(KeyPairType.RSA, 1024, new BouncyCastleProvider());
java.awt.EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
DAddExtensions dialog = new DAddExtensions(new JFrame(), "Add Extensions", new X509ExtensionSet(),
keyPair.getPublic(), new X500Name("cn=test"), BigInteger.ONE, keyPair.getPublic());
dialog.addWindowListener(new java.awt.event.WindowAdapter() {
@Override
public void windowClosed(java.awt.event.WindowEvent e) {
System.exit(0);
}
});
dialog.setVisible(true);
}
});
}
}
代码示例来源:origin: stackoverflow.com
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
JFrame frame = new JFrame("Testing");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLayout(new BorderLayout());
frame.add(new TestPane());
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
add(cellPane, gbc);
代码示例来源:origin: opensourceBIM/BIMserver
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
e.printStackTrace();
getContentPane().add(fields, BorderLayout.NORTH);
getContentPane().add(scrollPane, BorderLayout.CENTER);
getContentPane().add(buttons, BorderLayout.SOUTH);
代码示例来源:origin: skadistats/clarity-examples
public void run(String[] args) throws Exception {
final Context ctx = new SimpleRunner(new MappedFileSource(args[0])).runWith(this).getContext();
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
MainWindow window = new MainWindow();
window.getClassTree().setModel(new DefaultTreeModel(new TreeConstructor(ctx.getProcessor(DTClasses.class)).construct()));
window.getFrame().setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
代码示例来源:origin: stackoverflow.com
try{
System.out.println("setting look and feel");
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
}catch(Exception e){
System.out.println("Unable to set LookAndFeel");
defaultItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
setVisible(true);
setExtendedState(JFrame.NORMAL);
try {
tray.add(trayIcon);
setVisible(false);
System.out.println("added to SystemTray");
} catch (AWTException ex) {
try{
tray.add(trayIcon);
setVisible(false);
System.out.println("added to SystemTray");
}catch(AWTException ex){
setVisible(true);
setSize(300, 200);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
代码示例来源:origin: stackoverflow.com
public void run() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (final Exception e1) {
e1.printStackTrace();
l.setOpaque(false);
c.add(l, constraints);
b.setFocusable(false);
c.add(b, constraints);
代码示例来源:origin: stackoverflow.com
final JFrame frame = new JFrame("Demo buttons");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
buttonPanel.add(new JButton("Export do SVG"));
buttonPanel.add(new JButton("Export do PNG"));
buttonPanel.add(new JButton("Tisk..."));
frame.add(center);
frame.pack();
frame.setVisible(true);
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (Exception e) {
e.printStackTrace();
代码示例来源:origin: stackoverflow.com
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
JFrame frame = new JFrame("Testing");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
gbc.gridwidth = GridBagConstraints.REMAINDER;
frame.add(new JLabel("Hello world"), gbc);
frame.add(new JLabel("I'm on top"), gbc);
frame.add(new JButton("Clickity-clackity"), gbc);
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
} catch (IOException exp) {
exp.printStackTrace();
代码示例来源:origin: stackoverflow.com
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
try {
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException ex) {
JFrame frame = new JFrame("Testing");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLayout(new BorderLayout());
frame.add(new TestPane());
frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true);
内容来源于网络,如有侵权,请联系作者删除!