本文整理汇总了Java中javax.swing.JFrame.setExtendedState方法的典型用法代码示例。如果您正苦于以下问题:Java JFrame.setExtendedState方法的具体用法?Java JFrame.setExtendedState怎么用?Java JFrame.setExtendedState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.swing.JFrame
的用法示例。
在下文中一共展示了JFrame.setExtendedState方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: VideoLlamada
import javax.swing.JFrame; //导入方法依赖的package包/类
public void VideoLlamada() {
Webcam webcam = Webcam.getDefault();
WebcamPanel panel = new WebcamPanel(webcam);
panel.setFPSDisplayed(true);
JFrame window = new JFrame("VIDEO CALL");
window.setTitle("Haciendo videollamada con " + jt_Name_Contacts.getText());
window.setExtendedState(MAXIMIZED_BOTH);
panel.setFillArea(true);
window.add(panel);
window.pack();
window.setVisible(true);
}
示例2: displayCalibrationStatus
import javax.swing.JFrame; //导入方法依赖的package包/类
@Override
protected void displayCalibrationStatus(JFrame frame) throws Exception {
CalibrationStatusDisplay calibDisplay =
new CalibrationStatusDisplay(frame, calibrationPoints,new java.awt.geom.Point2D.Double[9]);
frame.setMinimumSize(new Dimension(600,300));
frame.add(calibDisplay);
frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
frame.setVisible(true);
frame.setTitle("Calibration: "+new Date());
Insets insets = frame.getInsets();
int width = frame.getSize().width-(insets.left+insets.right);
int height = frame.getSize().height-(insets.top+insets.bottom);
calibDisplay.windowDimension = new Dimension(width,height);
frame.toFront();
calibDisplay.repaint();
}
示例3: createAndShowGUI
import javax.swing.JFrame; //导入方法依赖的package包/类
/**
* Create the GUI and show it. For thread safety, this method should be
* invoked from the event-dispatching thread.
*/
private static void createAndShowGUI() {
// Create and set up the window.
final JFrame frame = new JFrame("IBM Slovakia / Fall Fest 2017 / Anthill");
frame.setExtendedState(frame.getExtendedState() | Frame.MAXIMIZED_BOTH);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Set up the content pane.
// frame.add(new Menu(new InitMenuData(), new GameMenuHandler(), frame),
// BorderLayout.CENTER);
final InitMenuData initMenuData = new InitMenuData();
initDummyData(initMenuData);
frame.add(new Menu(initMenuData, null, frame), BorderLayout.CENTER);
// Display the window.
frame.pack();
frame.setVisible(true);
}
示例4: show
import javax.swing.JFrame; //导入方法依赖的package包/类
/** Make the frame visible, non-iconized, and focused. */
public static void show(JFrame frame) {
frame.setVisible(true);
frame.setExtendedState(frame.getExtendedState() & ~JFrame.ICONIFIED);
frame.requestFocus();
frame.toFront();
}
示例5: viewReportFrame
import javax.swing.JFrame; //导入方法依赖的package包/类
/**
* Cria um JFrame para exibir o relatório representado pelo JasperPrint.
*
* @param titulo Título do JFrame.
* @param print JasperPrint do relatório.
*/
private static void viewReportFrame( String titulo, JasperPrint print ) {
/*
* Cria um JRViewer para exibir o relatório.
* Um JRViewer é uma JPanel.
*/
JRViewer viewer = new JRViewer( print );
// cria o JFrame
JFrame frameRelatorio = new JFrame( titulo );
// adiciona o JRViewer no JFrame
frameRelatorio.add( viewer, BorderLayout.CENTER );
// configura o tamanho padrão do JFrame
frameRelatorio.setSize( 500, 500 );
// maximiza o JFrame para ocupar a tela toda.
frameRelatorio.setExtendedState( JFrame.MAXIMIZED_BOTH );
// configura a operação padrão quando o JFrame for fechado.
frameRelatorio.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
// exibe o JFrame
frameRelatorio.setVisible( true );
}
示例6: FullFrame
import javax.swing.JFrame; //导入方法依赖的package包/类
public FullFrame(ThornsecModel model) {
JTabbedPane jtp = new JTabbedPane();
for (String network : model.getNetworkLabels()) {
jtp.add(network, getNetworkPane(model.getNetworkModel(network)));
}
JFrame frame = new JFrame("Thornsec");
frame.setExtendedState(frame.getExtendedState() | JFrame.MAXIMIZED_BOTH);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setContentPane(jtp);
frame.pack();
frame.setVisible(true);
}
示例7: main
import javax.swing.JFrame; //导入方法依赖的package包/类
public static void main(String[] args)
{
INSTANCE.init();
JFrame frame = new JFrame();
frame.getContentPane().add(INSTANCE);
frame.setExtendedState(JFrame.MAXIMIZED_BOTH);
frame.setTitle("JGraphT Adapter to JGraph Demo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
}
示例8: show
import javax.swing.JFrame; //导入方法依赖的package包/类
/** Make the frame visible, non-iconized, and focused. */
public static void show(JFrame frame) {
frame.setVisible(true);
frame.setExtendedState(frame.getExtendedState() & ~JFrame.ICONIFIED);
frame.requestFocus();
frame.toFront();
}
示例9: TweedFrame
import javax.swing.JFrame; //导入方法依赖的package包/类
public TweedFrame() {
instance = this;
frame = new JFrame();
WindowManager.register( frame );
Dimension d3Dim = new Dimension( 1024, 640 );
AppSettings settings = new AppSettings( true );
settings.setWidth( d3Dim.width );
settings.setHeight( d3Dim.height );
settings.setSamples( 4 );
settings.setVSync( true );
settings.setFrameRate( 60 );
tweed = new Tweed( this );
tweed.setSettings( settings );
tweed.createCanvas();
JmeCanvasContext ctx = (JmeCanvasContext) tweed.getContext();
ctx.setSystemListener( tweed );
canvas = ctx.getCanvas();
canvas.setPreferredSize( d3Dim );
frame.setLayout( new BorderLayout() );
frame.add( buildUI(), BorderLayout.EAST );
frame.add( canvas, BorderLayout.CENTER );
frame.setExtendedState( frame.getExtendedState() | JFrame.MAXIMIZED_BOTH );
frame.addWindowListener( new WindowAdapter() {
public void windowClosing( WindowEvent e ) {
TweedSettings.save(true);
Tweed.deleteScratch();
};
} );
scheduler.scheduleAtFixedRate( new Runnable() {
@Override
public void run() {
TweedSettings.save(true);
}
}, 30, 30, TimeUnit.SECONDS );
scheduler.scheduleAtFixedRate( new Runnable() {
@Override
public void run() {
Vector3d pt = tweed.cursorPosition;
if ( coordLabel != null && TweedSettings.settings.trans != null) {
worldLabel.setText( pt == null ? "..." : String.format( "%.4f, %.4f ",
pt.x,
pt.z) );
coordLabel.setText( pt == null ? "..." : String.format( "%.4f, %.4f ",
pt.x + TweedSettings.settings.trans[0],
pt.z + TweedSettings.settings.trans[1]) );
crsLabel.setText(TweedSettings.settings.gmlCoordSystem);
}
JFrame.setDefaultLookAndFeelDecorated( true );
}
}, 100, 100, TimeUnit.MILLISECONDS );
frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
frame.pack();
frame.setVisible( !HEADLESS );
tweed.startCanvas();
}
示例10: actionPerformed
import javax.swing.JFrame; //导入方法依赖的package包/类
public void actionPerformed(ActionEvent event) {
JFrame frame = getJFrame();
frame.setExtendedState(Frame.NORMAL);
frame.setVisible(true);
frame.toFront();
}
示例11: minimize
import javax.swing.JFrame; //导入方法依赖的package包/类
/** This method minimizes the window. */
public static void minimize(JFrame frame) {
frame.setExtendedState(JFrame.ICONIFIED);
}
示例12: zoom
import javax.swing.JFrame; //导入方法依赖的package包/类
/** This method alternatingly maximizes or restores the window. */
public static void zoom(JFrame frame) {
int both = JFrame.MAXIMIZED_BOTH;
frame.setExtendedState((frame.getExtendedState() & both) != both ? both : JFrame.NORMAL);
}
示例13: main
import javax.swing.JFrame; //导入方法依赖的package包/类
public static void main(String... args) throws Throwable
{
JFrame window = new JFrame();
window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
window.setTitle("What Happened to Station 7");
window.setMinimumSize(new Dimension(400, 225));
window.setLayout(new GridBagLayout());
window.setExtendedState(JFrame.MAXIMIZED_BOTH);
JFrame opening_text = new JFrame();
opening_text.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
opening_text.setTitle("This Is What Happened to Station 7");
JTextArea textField = new JTextArea(
"The date is 123.5432.1241511 Station 7 is in full operation when suddenly one of the arachnids spot a rather large blue and yellow battle-cruiser barreling towards the aft section of the outer wheel. It suddenly plunges it self deep within the station. The flag suddenly comes within view… Its the swedes on their eternal quest to increase their GDP. They start to scatter but they are not quick enough to survive the army of Carl XVI Gustaf. The Dramatic entrance of the battle-cruiser had created a hull breach and the amount of air in the station was starting to drop; those blast doors can only hold so long…. You Play as the aliens represented by the Purple hexes your objective is to get to the next floor of Staition 7 via the cyan ecape doors the sweds represented by the blue tiles are out to get you it would be in your best intrests to avoid them as they will kill you very quickly, if you notics your color shifting it indicats a change in helth and you will be best adviced to seek out the red health boxes but be carful as they will only heal you so much");
textField.setLineWrap(true);
textField.setWrapStyleWord(true);
opening_text.setMinimumSize(new Dimension(400, 225));
opening_text.add(textField, BorderLayout.PAGE_START);
opening_text.setExtendedState(JFrame.MAXIMIZED_BOTH);
opening_text.setAlwaysOnTop(true);
JFrame closing_text = new JFrame();
closing_text.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
closing_text.setTitle("You Have Fell to the Swedes");
JTextArea text = new JTextArea("You have failed to save your self…. The swedes trudge on obliterating the remaining inhabitants of the station. ");
text.setLineWrap(true);
text.setWrapStyleWord(true);
closing_text.setMinimumSize(new Dimension(400, 225));
closing_text.add(text, BorderLayout.PAGE_START);
closing_text.setExtendedState(JFrame.MAXIMIZED_BOTH);
SoundStuff soundStuff = new SoundStuff();
soundStuff.dbol();
Game game = new Game();
GameRenderer render = new GameRenderer(game);
render.addListeners(window);
GridBagConstraints layoutGame = new GridBagConstraints();
layoutGame.weightx = .9;
layoutGame.weighty = .9;
layoutGame.fill = GridBagConstraints.BOTH;
layoutGame.anchor = GridBagConstraints.NORTH;
window.add(render, layoutGame);
GameInfo info = new GameInfo(game);
info.addListeners();
GridBagConstraints layoutInfo = new GridBagConstraints();
layoutInfo.weightx = .1;
layoutInfo.weighty = .1;
layoutInfo.fill = GridBagConstraints.BOTH;
layoutInfo.anchor = GridBagConstraints.NORTH;
layoutInfo.gridy = 1;
window.add(info, layoutInfo);
game.init(render.new UIInterface(), info.new UIInterface());
closing_text.setVisible(true);
window.setVisible(true);
opening_text.setVisible(true);
Scanner reader = new Scanner(System.in);
int n = reader.nextInt();
if (n == 42)
{
System.out.print("adadfafd");
SoundStuff cam = null;
cam = new SoundStuff();
cam.CCCP();
reader.close();
}
}
示例14: minimize
import javax.swing.JFrame; //导入方法依赖的package包/类
/** This method minimizes the window. */
public static void minimize(JFrame frame) { frame.setExtendedState(JFrame.ICONIFIED); }
示例15: zoom
import javax.swing.JFrame; //导入方法依赖的package包/类
/** This method alternatingly maximizes or restores the window. */
public static void zoom(JFrame frame) {
int both = JFrame.MAXIMIZED_BOTH;
frame.setExtendedState((frame.getExtendedState() & both)!=both ? both : JFrame.NORMAL);
}