本文整理汇总了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: 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);
}
示例4: 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);
}