當前位置: 首頁>>代碼示例>>Java>>正文


Java JFrame.setExtendedState方法代碼示例

本文整理匯總了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);
}
 
開發者ID:alexycruz1,項目名稱:LP_Proyecto,代碼行數:17,代碼來源:Principal.java

示例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();
}
 
開發者ID:SERESLab,項目名稱:iTrace-Archive,代碼行數:20,代碼來源:SystemMouseTracker.java

示例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);
}
 
開發者ID:gamefest2017,項目名稱:ants,代碼行數:22,代碼來源:Menu.java

示例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();
}
 
開發者ID:ModelWriter,項目名稱:Tarski,代碼行數:8,代碼來源:OurUtil.java

示例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 );
 
}
 
開發者ID:iuryamicussi,項目名稱:TrabalhoCrisParte2,代碼行數:34,代碼來源:ReportUtils.java

示例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);
}
 
開發者ID:privacyint,項目名稱:thornsec-core,代碼行數:14,代碼來源:FullFrame.java

示例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);
}
 
開發者ID:LouisJenkinsCS,項目名稱:DSL,代碼行數:13,代碼來源:ASTGraph.java

示例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();
}
 
開發者ID:AlloyTools,項目名稱:org.alloytools.alloy,代碼行數:8,代碼來源:OurUtil.java

示例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();
	}
 
開發者ID:twak,項目名稱:chordatlas,代碼行數:72,代碼來源:TweedFrame.java

示例10: actionPerformed

import javax.swing.JFrame; //導入方法依賴的package包/類
public void actionPerformed(ActionEvent event) {
	JFrame frame = getJFrame();
	frame.setExtendedState(Frame.NORMAL);
	frame.setVisible(true);
	frame.toFront();
}
 
開發者ID:LogisimIt,項目名稱:Logisim,代碼行數:7,代碼來源:WindowMenuItem.java

示例11: minimize

import javax.swing.JFrame; //導入方法依賴的package包/類
/** This method minimizes the window. */
public static void minimize(JFrame frame) {
	frame.setExtendedState(JFrame.ICONIFIED);
}
 
開發者ID:AlloyTools,項目名稱:org.alloytools.alloy,代碼行數:5,代碼來源:OurUtil.java

示例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);
}
 
開發者ID:AlloyTools,項目名稱:org.alloytools.alloy,代碼行數:6,代碼來源:OurUtil.java

示例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();
	}
}
 
開發者ID:Chroniaro,項目名稱:What-Happened-to-Station-7,代碼行數:72,代碼來源:Station7.java

示例14: minimize

import javax.swing.JFrame; //導入方法依賴的package包/類
/** This method minimizes the window. */
public static void minimize(JFrame frame) { frame.setExtendedState(JFrame.ICONIFIED); }
 
開發者ID:ModelWriter,項目名稱:Tarski,代碼行數:3,代碼來源:OurUtil.java

示例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);
}
 
開發者ID:ModelWriter,項目名稱:Tarski,代碼行數:6,代碼來源:OurUtil.java


注:本文中的javax.swing.JFrame.setExtendedState方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。