Package javax.swing

Examples of javax.swing.JFrame


    ct.start();
  }

  void showGUI()
  {
    loginFrame = new JFrame("Ganymed SSH2 SwingShell");

    hostLabel = new JLabel("Hostname:");
    userLabel = new JLabel("Username:");

    hostField = new JTextField("", 20);
View Full Code Here


     * Show the table in its own frame.
     */
    public void showTable() {
        if (tableFrame == null) {
            String tableTitle = (this.name != null) ? this.name : "";
            tableFrame = new JFrame(tableTitle + " Shape Data Attributes");

            JScrollPane pane = new JScrollPane(getTable(), JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);

            tableFrame.getContentPane().add(pane, BorderLayout.CENTER);

View Full Code Here

      frame.setVisible(false);
    }
  }

  private JFrame createGUI() {
    JFrame frame = new JFrame(getFullName());
   
   
    return frame;
  }
View Full Code Here

            SVGRasterizer svgr = new SVGRasterizer(fileURL);
            svgr.setBackgroundColor(OMColor.clear);
            BufferedImage bi = svgr.createBufferedImage();

            JFrame frame = new JFrame();
            frame.addWindowListener(new WindowAdapter() {
                public void windowClosed(WindowEvent e) {
                    System.exit(0);
                }
            });
            frame.getContentPane().add(new JLabel(new ImageIcon(bi)));
            frame.pack();
            frame.setVisible(true);

        } catch (TranscoderException e2) {
            e2.printStackTrace();
        } catch (MalformedURLException e) {
            e.printStackTrace();
View Full Code Here

        pane.setAlignmentX(Component.CENTER_ALIGNMENT);
        pane.setAlignmentY(Component.BOTTOM_ALIGNMENT);
        pane.add(layerGUI);
        pane.add(dismissBox);

        final JFrame frame = getPaletteWindow(pane, layer.getName()
                + " Palette", cl);

        dismiss.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                frame.setVisible(false);
            }
        });
        return frame;
    }
View Full Code Here

        JScrollPane scrollPane = new JScrollPane(gui, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
        scrollPane.setAlignmentX(Component.LEFT_ALIGNMENT);
        scrollPane.setAlignmentY(Component.TOP_ALIGNMENT);

        // create the palette internal window
        JFrame paletteWindow = new JFrame(windowName);

        paletteWindow.addComponentListener(cl);
        paletteWindow.getContentPane().add(scrollPane);
        //layout all the components
        paletteWindow.pack();
        return paletteWindow;
    }
View Full Code Here

        JPanel pane = new JPanel();
        pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
        pane.setAlignmentX(Component.CENTER_ALIGNMENT);
        pane.setAlignmentY(Component.BOTTOM_ALIGNMENT);
        pane.add(gui);
        JFrame paletteWindow = new JFrame(windowName);
        paletteWindow.addComponentListener(cl);
        paletteWindow.getContentPane().add(pane);
        paletteWindow.pack();

        return paletteWindow;
    }
View Full Code Here

    super();
  }

  public static void main(String[] args) {
    logger.info("Building up GUI");
    frame = new JFrame("Just4Log");
    Just4LogGui app = new Just4LogGui();

    JComponent contents = app.createComponents();
    frame.getContentPane().add(contents, BorderLayout.CENTER);
View Full Code Here

public class SimpleMap {

    public static void main(String args[]) {

        // Create a Swing frame
        JFrame frame = new JFrame("Simple Map");

        // Size the frame appropriately
        frame.setSize(640, 480);

        // Create a MapBean
        MapBean mapBean = new MapBean();

        // Create a ShapeLayer to show world political boundaries.
        // Set the properties of the layer. This assumes that the
        // datafiles "dcwpo-browse.shp" and "dcwpo-browse.ssx" are in
        // a path specified in the CLASSPATH variable. These files
        // are distributed with OpenMap and reside in the toplevel
        // "share" subdirectory.
        ShapeLayer shapeLayer = new ShapeLayer();
        Properties shapeLayerProps = new Properties();
        shapeLayerProps.put("prettyName", "Political Solid");
        shapeLayerProps.put("lineColor", "000000");
        shapeLayerProps.put("fillColor", "BDDE83");
        shapeLayerProps.put("shapeFile", "data/shape/dcwpo-browse.shp");
        shapeLayerProps.put("spatialIndex", "data/shape/dcwpo-browse.ssx");
        shapeLayer.setProperties(shapeLayerProps);

        // Add the political layer to the map
        mapBean.add(shapeLayer);

        // Add the map to the frame
        frame.getContentPane().add(mapBean);

        frame.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });

        // Display the frame
        frame.setVisible(true);
    }
View Full Code Here

        super.exitWindowClosed();
    }

    public void showGUI(String filename) {
        if (frame == null) {
            frame = new JFrame("Editing Attribute File Structure");

            frame.getContentPane().add(getGUI(filename, MODIFY_ROW_MASK
                    | DONE_MASK),
                    BorderLayout.CENTER);
View Full Code Here

TOP

Related Classes of javax.swing.JFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.