javax.swing.JFrame.setDefaultLookAndFeelDecorated()方法的使用及代码示例

x33g5p2x  于2022-01-21 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(234)

本文整理了Java中javax.swing.JFrame.setDefaultLookAndFeelDecorated()方法的一些代码示例,展示了JFrame.setDefaultLookAndFeelDecorated()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JFrame.setDefaultLookAndFeelDecorated()方法的具体详情如下:
包路径:javax.swing.JFrame
类名称:JFrame
方法名:setDefaultLookAndFeelDecorated

JFrame.setDefaultLookAndFeelDecorated介绍

暂无

代码示例

代码示例来源:origin: stanfordnlp/CoreNLP

private void createAndShowGUI() {
 //Make sure we have nice window decorations.
 JFrame.setDefaultLookAndFeelDecorated(true);
 //Create and set up the window.
 frame = new JFrame("Stanford Named Entity Recognizer");
 frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
 frame.getContentPane().setLayout(new BorderLayout());
 frame.getContentPane().setSize(WIDTH, HEIGHT);
 frame.setJMenuBar(addMenuBar());
 //frame.setSize(new Dimension(WIDTH, HEIGHT));
 frame.setSize(WIDTH, HEIGHT);
 buildTagPanel();
 buildContentPanel();
 //Display the window.
 frame.pack();
 frame.setSize(WIDTH, HEIGHT);
 frame.setVisible(true);
}

代码示例来源:origin: stanfordnlp/CoreNLP

private void createAndShowGUI() {
 //Make sure we have nice window decorations.
 JFrame.setDefaultLookAndFeelDecorated(true);
 //Create and set up the window.
 frame = new JFrame("Stanford Named Entity Recognizer");
 frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
 frame.getContentPane().setLayout(new BorderLayout());
 frame.getContentPane().setPreferredSize(new Dimension(WIDTH, HEIGHT));
 frame.setJMenuBar(addMenuBar());
 buildTagPanel();
 buildContentPanel();
 buildExtractButton();
 extractButton.setEnabled(false);
 extract.setEnabled(false);
 //Display the window.
 frame.pack();
 frame.setVisible(true);
}

代码示例来源:origin: stackoverflow.com

import java.awt.*;
import javax.swing.*;

public class Test extends JFrame
{
  public Test()
  {
    GraphicsEnvironment env =
GraphicsEnvironment.getLocalGraphicsEnvironment();
    this.setMaximizedBounds(env.getMaximumWindowBounds());
    this.setExtendedState(this.getExtendedState() | this.MAXIMIZED_BOTH);
  }

  public static void main(String[] args)
  {
    JFrame.setDefaultLookAndFeelDecorated(true);

    Test t = new Test();
    t.setVisible(true);
  }
}

代码示例来源:origin: RipMeApp/ripme

checkChoise.add(yesButton);
checkChoise.add(noButton);
JFrame.setDefaultLookAndFeelDecorated(true);
JFrame frame = new JFrame("Are you sure?");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

代码示例来源:origin: org.apache.pig/pig

/**
 * Create the GUI and show it.  For thread safety,
 * this method should be invoked from the
 * event-dispatching thread.
 */
private static void createAndShowGUI() {
  //Make sure we have nice window decorations.
  JFrame.setDefaultLookAndFeelDecorated(true);
}

代码示例来源:origin: iamxiatian/xsimilarity

public static void main(String[] args) {
  JFrame.setDefaultLookAndFeelDecorated(true);
  SwingUtilities.invokeLater(new Runnable() {
    public void run() {
      WordSimlarityUI w = new WordSimlarityUI();
      w.setVisible(true);
    }
  });
}

代码示例来源:origin: stackoverflow.com

package com.firstFrameApp.helloworld;

import javax.swing.*;
import javax.swing.JFrame;

public class helloWorld
{
  public static void main(String[] args)
  {
    JFrame.setDefaultLookAndFeelDecorated(true);

    JFrame frame0 = new JFrame("Hello World Example");

    frame0.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  }
}

代码示例来源:origin: org.codeartisans.swing-on-steroids/sos-ui-swing

@Override
public void run()
{
  try {
    JFrame.setDefaultLookAndFeelDecorated( true );
    JDialog.setDefaultLookAndFeelDecorated( true );
    UIManager.setLookAndFeel( className );
  } catch ( Exception ex ) {
    throw new SwingFault( ex.getMessage(), ex );
  }
}

代码示例来源:origin: org.codeartisans.swing-on-steroids/sos-ui-swing

@Override
public void run()
{
  try {
    JFrame.setDefaultLookAndFeelDecorated( true );
    JDialog.setDefaultLookAndFeelDecorated( true );
    UIManager.setLookAndFeel( lookAndFeel );
  } catch ( Exception ex ) {
    throw new SwingFault( ex.getMessage(), ex );
  }
}

代码示例来源:origin: us.ihmc/IHMCAvatarInterfaces

private static void createAndShowGUI()
{
 JFrame.setDefaultLookAndFeelDecorated(true);
 JFrame frame = new JFrame("Sound Detection");
 SoundDetectorGui demo = new SoundDetectorGui();
 frame.setContentPane(demo.createContentPane());
 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 frame.setSize(360, 190);
 frame.setVisible(true);
 soundDetector = new SoundDetector(statusIndicator);
}

代码示例来源:origin: us.ihmc/DarpaRoboticsChallenge

private static void createAndShowGUI()
{
 JFrame.setDefaultLookAndFeelDecorated(true);
 JFrame frame = new JFrame("Sound Detection");
 SoundDetectorGui demo = new SoundDetectorGui();
 frame.setContentPane(demo.createContentPane());
 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 frame.setSize(360, 190);
 frame.setVisible(true);
 soundDetector = new SoundDetector(statusIndicator);
}

代码示例来源:origin: us.ihmc/ihmc-avatar-interfaces

private static void createAndShowGUI()
{
 JFrame.setDefaultLookAndFeelDecorated(true);
 JFrame frame = new JFrame("Sound Detection");
 SoundDetectorGui demo = new SoundDetectorGui();
 frame.setContentPane(demo.createContentPane());
 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
 frame.setSize(360, 190);
 frame.setVisible(true);
 soundDetector = new SoundDetector(statusIndicator);
}

代码示例来源:origin: org.jdtaus.editor/jdtaus-editor-client-application

/** Initializes the instance centering the dialog on the screen. */
public void initialize()
{
  JFrame.setDefaultLookAndFeelDecorated(true);
  final Dimension screenSize = Toolkit.getDefaultToolkit().
    getScreenSize();
  this.initComponents();
  this.setLocation(screenSize.width / 2 - this.getWidth() / 2,
    screenSize.height / 2 - this.getHeight() / 2);
}

代码示例来源:origin: khuxtable/seaglass

/**
 * Called by UIManager when this look and feel is uninstalled.
 */
@Override
public void uninitialize() {
  removeOurUIs();
  resetDefaultBorders();
  JFrame.setDefaultLookAndFeelDecorated(false);
  super.uninitialize();
}

代码示例来源:origin: GoldenGnu/jeveassets

private static void createAndShowGUI() {
  initLookAndFeel();
  //Make sure we have nice window decorations.
  JFrame.setDefaultLookAndFeelDecorated(true);
  JDialog.setDefaultLookAndFeelDecorated(true);
  Main main = new Main();
}

代码示例来源:origin: net.sf.squirrel-sql.plugins/laf

void applyPreferences()
{
  final LAFPreferences prefs = _plugin.getLAFPreferences();
  JFrame.setDefaultLookAndFeelDecorated(prefs.getCanLAFSetBorder());
  JDialog.setDefaultLookAndFeelDecorated(prefs.getCanLAFSetBorder());
}

代码示例来源:origin: uk.gov.nationalarchives/droid-ui

public void run() {
    JFrame.setDefaultLookAndFeelDecorated(true);
    DroidMainFrame main = new DroidMainFrame();
    main.setVisible(false);
    main.init();
    main.setVisible(true);
    main.checkSignatureUpdates();
    main.createDefaultProfile();
  }
});

代码示例来源:origin: net.java.dev.designgridlayout/designgridlayout

public static void main(String[] args) throws Exception
{
  // Change LAF?
  UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
  JFrame.setDefaultLookAndFeelDecorated(true);
  Bug36SmartResizeProblemWhenSrinking example = 
    new Bug36SmartResizeProblemWhenSrinking();
  example.go(true);
}

代码示例来源:origin: net.sf.ingenias/editor

public void actionPerformed(ActionEvent e) {
  Help h = new Help();
  h.loadHelp("doc/help/index.htm");
  JFrame.setDefaultLookAndFeelDecorated(true);
  h.helpPane.setCaretPosition(0);
  h.pack();
  h.setExtendedState(JFrame.MAXIMIZED_BOTH);
  h.show();
 }
});

代码示例来源:origin: kaikramer/keystore-explorer

private static void initLookAndFeel(ApplicationSettings applicationSettings) {
  LnfUtil.installLnfs();
  String lookFeelClassName = applicationSettings.getLookAndFeelClass();
  if (lookFeelClassName != null) {
    LnfUtil.useLnf(lookFeelClassName);
  } else {
    String lookAndFeelClass = LnfUtil.useLnfForPlatform();
    applicationSettings.setLookAndFeelClass(lookAndFeelClass);
  }
  boolean lookFeelDecorated = applicationSettings.getLookAndFeelDecorated();
  JFrame.setDefaultLookAndFeelDecorated(lookFeelDecorated);
  JDialog.setDefaultLookAndFeelDecorated(lookFeelDecorated);
}

相关文章

JFrame类方法