Package java.awt

Examples of java.awt.Panel$AccessibleAWTPanel


      GridBagLayout gridbag = new GridBagLayout();
      GridBagConstraints c = new GridBagConstraints();

      panel.add(scroll,         BorderLayout.CENTER);

      Panel cmdPanel = new Panel(new BorderLayout());

      cmdLabel = new Label("> ");
      cmdPanel.add(cmdLabel,        BorderLayout.WEST);
      cmdPanel.add(tfCmd,           BorderLayout.CENTER);

      panel.add(cmdPanel,        BorderLayout.SOUTH);


      reinit();
View Full Code Here


        else{
            tempImage = Toolkit.getDefaultToolkit().createImage(tempFile.getAbsolutePath());
            myImageFileName = tempFile.getAbsolutePath();
        }
        if (tempImage == null) throw new Exception("Error reading image "+tempFile.getAbsolutePath());
        MediaTracker mt = new MediaTracker(new Panel());
        mt.addImage(tempImage, 1);
        mt.waitForAll();
        setImage(tempImage);
    }
View Full Code Here

    f.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
        System.exit(0);
      }
    });
    Panel p = new Panel();
    f.getContentPane().add(p);
    f.setSize(320, 240);
    f.setVisible(true);
    N3SoftwareRenderContext c = new N3SoftwareRenderContext(p, true);
    BasicTest test = new BasicTest(c);
View Full Code Here

    init();
    start();
  }

  public void init() {
    c = new Panel();
    this.getContentPane().add(c);
    setVisible(true);
  }
View Full Code Here

            }
        });
    }

    public NonTransparentOverlayTest() {
        Panel p = new Panel();
        p.setBackground(Color.orange); // The label "transparent" background will actually get this
                                       // background colour
        p.setLayout(null);

        c = new Canvas();
        c.setBackground(Color.black);
        c.setBounds(0, 0, 1000, 900);

        o1 = new Canvas();
        o1.setBackground(Color.green);
        o1.setBounds(100, 60, 200, 300);

        o2 = new Canvas();
        o2.setBackground(Color.red);
        o2.setBounds(400, 200, 150, 150);

        o3 = new Canvas();
        o3.setBackground(Color.blue);
        o3.setBounds(50, 500, 200, 200);

        o4 = new Label("I am a label");
        o4.setForeground(Color.red);
        o4.setFont(new Font("Sansserif", Font.BOLD, 48));
        o4.setBounds(400, 600, 400, 50);

        p.add(o1);
        p.add(o2);
        p.add(o3);
        p.add(o4);

        p.add(c); // <--- must be added LAST to appear underneath the other components

        f = new Frame("Heavyweight Overlay Test");
        f.setLayout(new BorderLayout());
        f.setSize(1000, 900);
        f.add(p, BorderLayout.CENTER);
View Full Code Here

        "Yin Xunjun",
        "Eugene Zimichev"};

    public AboutDialog(Frame f) {
        super(f, LocalisationHelper.getString("about_dialog_title"));
        Panel logoPanel = new Panel();
        ImageIcon logoIcon = new ImageIcon(getClass().getResource(LocalisationHelper.getString("about_dialog_image")));
        JLabel la_icon = new JLabel(logoIcon);
        la_icon.setBorder(new SoftBevelBorder(SoftBevelBorder.LOWERED));
        logoPanel.add(la_icon);

        JPanel versionPanel = new JPanel();
        versionPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
        versionPanel.setLayout(new GridBagLayout());

        JLabel copyright = new JLabel("\u00A9" + " 2011-2014: Joerg Wuethrich and contributors", JLabel.CENTER);

        JLabel contributorsLabel = new JLabel("contributors (alphabetically ordered):", JLabel.CENTER);
        contributorsLabel.setForeground(Color.GRAY);
        JLabel contributors = new JLabel(formatContributors(CONTRIBUTORS), JLabel.CENTER);
        contributors.setPreferredSize(calculatePreferredSize(contributors, true, logoIcon.getIconWidth()));

        JLabel version = new JLabel("<html><font color=\"gray\">version:</font> " + BuildInfoReader.getVersion() + "</html>", JLabel.CENTER);
        JLabel buildDate = new JLabel("<html><font color=\"gray\">build date:</font> " + BuildInfoReader.getBuildDate() + "</html>", JLabel.CENTER);

        GridBagConstraints gridBagConstraints = new GridBagConstraints();
        gridBagConstraints.anchor = GridBagConstraints.NORTH;
        gridBagConstraints.fill = GridBagConstraints.VERTICAL;
        gridBagConstraints.gridx = 0;

        versionPanel.add(copyright, gridBagConstraints);

        Insets insetsGapOnTop = new Insets(10, 0, 0, 0);
        GridBagConstraints gridBagConstraintsGapOnTop = new GridBagConstraints();
        gridBagConstraintsGapOnTop.gridy = 1;
        gridBagConstraintsGapOnTop.insets = insetsGapOnTop;
        versionPanel.add(contributorsLabel, gridBagConstraintsGapOnTop);

        gridBagConstraints.gridy = 2;
        gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
        versionPanel.add(contributors, gridBagConstraints);
        gridBagConstraints.fill = GridBagConstraints.VERTICAL;

        gridBagConstraintsGapOnTop.gridy = 3;
        versionPanel.add(version, gridBagConstraintsGapOnTop);

        gridBagConstraints.gridy = 4;
        versionPanel.add(buildDate, gridBagConstraints);

        Panel buttonPanel = new Panel();
        buttonPanel.setLayout(new FlowLayout(FlowLayout.CENTER));
        if (UrlDisplayHelper.displayUrlIsSupported()) {
        JButton homePageButton = new JButton("Homepage");
            homePageButton.setActionCommand(ACTION_HOMEPAGE);
            homePageButton.addActionListener(this);
            buttonPanel.add(homePageButton);
        }

        JButton okButton = new JButton(LocalisationHelper.getString("button_ok"));
        okButton.setActionCommand(ACTION_OK);
        okButton.addActionListener(this);
        buttonPanel.add(okButton);
        getContentPane().add("North", logoPanel);
        getContentPane().add("Center", versionPanel);
        getContentPane().add("South", buttonPanel);
        pack();
        setResizable(false);
View Full Code Here

       
        return size;
    }

    protected void initComponents() {
        Panel buttonPanel = new Panel();
        buttonPanel.setLayout(new FlowLayout(FlowLayout.CENTER));
        JButton okButton = new JButton(LocalisationHelper.getString("button_ok"));
        okButton.setActionCommand(ACTION_OK);
        okButton.addActionListener(this);
        buttonPanel.add(okButton);
       
        getContentPane().add("South", buttonPanel);
    }
View Full Code Here

         textArea.setText(sw.toString());
         textArea.setEditable(false);
         add(textArea, BorderLayout.CENTER);
        
         // add a border on both sides of the console
         add(new Panel(), BorderLayout.LINE_START);
         add(new Panel(), BorderLayout.LINE_END);
        
         Panel bottomPanel = new Panel();
         bottomPanel.setLayout(new GridLayout(0, 1));
         Label infoLabel1 = new Label("An error occured while running the applet.", Label.CENTER);
         Label infoLabel2 = new Label("Plese contact support to resolve this issue.", Label.CENTER);
         infoLabel1.setFont(consoleFont);
         infoLabel2.setFont(consoleFont);
         bottomPanel.add(infoLabel1);
         bottomPanel.add(infoLabel2);
         add(bottomPanel, BorderLayout.PAGE_END);
      }
View Full Code Here

    fNumberOfRuns= new Label("0000", Label.RIGHT);
    fNumberOfRuns.setText("0");
    fNumberOfRuns.setFont(PLAIN_FONT);

    Panel numbersPanel= createCounterPanel();

    //---- fourth section
    Label failureLabel= new Label("Errors and Failures:");

    fFailureList= new List(5);
    fFailureList.addItemListener(
      new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
          failureSelected();
        }
      }
    );
    fRerunButton= new Button("Run");
    fRerunButton.setEnabled(false);
    fRerunButton.addActionListener(
      new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          rerun();
        }
      }
    );

    Panel failedPanel= new Panel(new GridLayout(0, 1, 0, 2));
    failedPanel.add(fRerunButton);

    fTraceArea= new TextArea();
    fTraceArea.setRows(5);
    fTraceArea.setColumns(60);

    //---- fifth section
    fStatusLine= new TextField();
    fStatusLine.setFont(PLAIN_FONT);
    fStatusLine.setEditable(false);
    fStatusLine.setForeground(Color.red);

    fQuitButton= new Button("Exit");
    fQuitButton.addActionListener(
      new ActionListener() {
        public void actionPerformed(ActionEvent e) {
          System.exit(0);
        }
      }
    );

    // ---------
    fLogo= new Logo();

    //---- overall layout
    Panel panel= new Panel(new GridBagLayout());

    addGrid(panel, suiteLabel,     0, 0, 2, GridBagConstraints.HORIZONTAL,   1.0, GridBagConstraints.WEST);

    addGrid(panel, fSuiteField,    0, 1, 2, GridBagConstraints.HORIZONTAL,   1.0, GridBagConstraints.WEST);
    addGrid(panel, fRun,        2, 1, 1, GridBagConstraints.HORIZONTAL,   0.0, GridBagConstraints.CENTER);
View Full Code Here

    frame.pack();
    return frame;
  }

  protected Panel createCounterPanel() {
    Panel numbersPanel= new Panel(new GridBagLayout());
    addToCounterPanel(
      numbersPanel,
      new Label("Runs:"),
      0, 0, 1, 1, 0.0, 0.0,
            GridBagConstraints.CENTER, GridBagConstraints.NONE,
View Full Code Here

TOP

Related Classes of java.awt.Panel$AccessibleAWTPanel

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.