Пример #1
0
 public PropertyEditor(JFrame frame)
 {
   base.\u002Ector((Frame) frame, true);
   PropertyEditor propertyEditor = this;
   this.tableModel = new PropertyEditor.PropTableModel(this);
   PropertyEditor.PropertiesTable.__\u003Cclinit\u003E();
   this.table = (JTable) new PropertyEditor.PropertiesTable(this, (AbstractTableModel) this.tableModel);
   this.table.setGridColor((Color) Color.LIGHT_GRAY);
   this.table.setRowSelectionAllowed(false);
   JScrollPane.__\u003Cclinit\u003E();
   JScrollPane jscrollPane = new JScrollPane((Component) this.table);
   ((Window) this).setBounds(100, 100, 300, 400);
   this.getContentPane().setLayout((LayoutManager) new BorderLayout());
   this.getContentPane().add((Component) jscrollPane, (object) "Center");
 }
Пример #2
0
 public static void initGui(MinecraftServer minecraftserver)
 {
     try
     {
         UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
     }
     catch (Exception)
     {
     }
     var servergui = new ServerGUI(minecraftserver);
     var jframe = new JFrame("Minecraft server");
     jframe.add(servergui);
     jframe.pack();
     jframe.setLocationRelativeTo(null);
     jframe.setVisible(true);
     jframe.addWindowListener(new ServerWindowAdapter(minecraftserver));
 }
Пример #3
0
        public __Form()
        {
            this.InternalElement = new JFrame();
            //this.InternalElement = new JDialog();
            this.InternalElement.setSize(300, 300);

            this.InternalElement.getContentPane().setLayout(null);

            // fixme: jsc should make delegate methods public!
            // java cannot call them otherwise

            this.InternalElement.addWindowListener(
                new __WindowListener
                {
                    Closed = RaiseFormClosed,
                    Closing = RaiseFormClosing,
                }

            );
        }
Пример #4
0
		/**
		 * Main program (used when run as application instead of applet).
		 */
		public static void main(String[] args)
		{
			DelaunayAp applet = new DelaunayAp();  // Create applet
			applet.init();                         // Perform applet initialization
			JFrame dWindow = new JFrame();         // Create window
			dWindow.setSize(700, 500);             // Set window size
			dWindow.setTitle("Voronoi/Delaunay Window");
			// Set window title
			dWindow.getContentPane().setLayout(new BorderLayout());
			// Specify layout manager
			dWindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			// Specify closing behavior
			dWindow.getContentPane().add(applet, "Center");
			// Place applet into window
			dWindow.setVisible(true);              // Show the window
		}