本文整理匯總了Java中javax.swing.JFrame.setLocationByPlatform方法的典型用法代碼示例。如果您正苦於以下問題:Java JFrame.setLocationByPlatform方法的具體用法?Java JFrame.setLocationByPlatform怎麽用?Java JFrame.setLocationByPlatform使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.swing.JFrame
的用法示例。
在下文中一共展示了JFrame.setLocationByPlatform方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createAndShowTaskVisualization3DViewerGUI
import javax.swing.JFrame; //導入方法依賴的package包/類
public static void createAndShowTaskVisualization3DViewerGUI() {
frameTaskVisualization3DViewer = new JFrame("TaskVisualization3DViewer");
frameTaskVisualization3DViewer.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
taskVisualization3D = new TaskVisualization3D();
taskVisualization3D.setOpaque(true); //content panes must be opaque
frameTaskVisualization3DViewer.setContentPane(taskVisualization3D);
frameTaskVisualization3DViewer.pack();
frameTaskVisualization3DViewer.setLocationByPlatform(true);
frameTaskVisualization3DViewer.setVisible(true);
int x = taskVisualization3DSizeX;
int y = taskVisualization3DSizeY;
frameTaskVisualization3DViewer.setSize(x, y);
frameTaskVisualization3DViewer.setBackground(Color.WHITE);
}
示例2: createAndShowTaskVisualization2DViewerGUI
import javax.swing.JFrame; //導入方法依賴的package包/類
public static void createAndShowTaskVisualization2DViewerGUI() {
frameTaskVisualization2DViewer = new JFrame("TaskVisualization2DViewer");
frameTaskVisualization2DViewer.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
taskVisualization2D = new TaskVisualization2D();
taskVisualization2D.setOpaque(true); //content panes must be opaque
frameTaskVisualization2DViewer.setContentPane(taskVisualization2D);
frameTaskVisualization2DViewer.pack();
frameTaskVisualization2DViewer.setLocationByPlatform(true);
frameTaskVisualization2DViewer.setVisible(true);
int x = simulatedWindowDefaultSizeX + taskVisualization2DExtendSizeX;
int y = simulatedWindowDefaultSizeY + taskVisualization2DExtendSizeY;
frameTaskVisualization2DViewer.setSize(x, y);
frameTaskVisualization2DViewer.setBackground(Color.WHITE);
}
示例3: aboutPage
import javax.swing.JFrame; //導入方法依賴的package包/類
private void aboutPage()
{
JFrame about = new JFrame();
about.setLocationByPlatform(true);
about.setVisible(true);
about.setTitle("About");
about.setBounds(100, 100, 600, 400);
about.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
about.getContentPane().setLayout(null);
JPanel panel = new JPanel();
panel.setBounds(0, 0, 584, 361);
about.getContentPane().add(panel);
panel.setLayout(null);
JLabel lblMotionProfileGenerator = new JLabel("Motion Profile Generator");
lblMotionProfileGenerator.setFont(new Font("Arial", Font.PLAIN, 34));
lblMotionProfileGenerator.setBounds(109, 29, 365, 64);
panel.add(lblMotionProfileGenerator);
JLabel lblVersion = new JLabel("Version 2.0.0");
lblVersion.setFont(new Font("Arial", Font.PLAIN, 14));
lblVersion.setBounds(82, 104, 85, 14);
panel.add(lblVersion);
JLabel lblThisProductIs = new JLabel("This product is licensed under the MIT license");
lblThisProductIs.setFont(new Font("Arial", Font.PLAIN, 14));
lblThisProductIs.setBounds(82, 128, 296, 14);
panel.add(lblThisProductIs);
JLabel lblDevelopers = new JLabel("Developers");
lblDevelopers.setFont(new Font("Arial", Font.PLAIN, 14));
lblDevelopers.setBounds(82, 152, 85, 14);
panel.add(lblDevelopers);
JLabel lblLukeMammen = new JLabel("Luke Mammen");
lblLukeMammen.setFont(new Font("Arial", Font.PLAIN, 14));
lblLukeMammen.setBounds(109, 176, 110, 14);
panel.add(lblLukeMammen);
JLabel lblBlakeMammen = new JLabel("Blake Mammen");
lblBlakeMammen.setFont(new Font("Arial", Font.PLAIN, 14));
lblBlakeMammen.setBounds(109, 200, 110, 14);
panel.add(lblBlakeMammen);
JLabel lblAcknowedgements = new JLabel("Acknowledgments");
lblAcknowedgements.setFont(new Font("Arial", Font.PLAIN, 14));
lblAcknowedgements.setBounds(82, 224, 150, 14);
panel.add(lblAcknowedgements);
JLabel lblJaci = new JLabel("Jaci for the path generation code");
lblJaci.setFont(new Font("Arial", Font.PLAIN, 14));
lblJaci.setBounds(109, 248, 250, 14);
panel.add(lblJaci);
JLabel lblJH = new JLabel("KHEngineering for the graph code");
lblJH.setFont(new Font("Arial", Font.PLAIN, 14));
lblJH.setBounds(109, 272, 250, 14);
panel.add(lblJH);
}
示例4: createAndShowEntitiesViewerGUI
import javax.swing.JFrame; //導入方法依賴的package包/類
public static void createAndShowEntitiesViewerGUI() {
frameEntitiesViewer = new JFrame("EntitiesViewer");
frameEntitiesViewer.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
newContentPaneEntitiesViewer = new EntitiesViewer();
newContentPaneEntitiesViewer.setOpaque(true); //content panes must be opaque
frameEntitiesViewer.setContentPane(newContentPaneEntitiesViewer);
frameEntitiesViewer.pack();
frameEntitiesViewer.setLocationByPlatform(true);
frameEntitiesViewer.setVisible(true);
}