Package java.awt

Examples of java.awt.Button.addActionListener()


    selectionPanel = new Panel();
    selectionPanel.setLayout(new BorderLayout());
    selectionPanel.add(new Label("Demo", Label.CENTER), BorderLayout.NORTH);

    Button fullScreen = new Button("Fullscreen");
    fullScreen.addActionListener(new ActionListener() {

      public void actionPerformed(ActionEvent event) {
        toggleFullscreen();
      }
    });
View Full Code Here


           
            c.fill = GridBagConstraints.BOTH;
            c.gridwidth = 1;
            gridBag.setConstraints( button, c );
            container.add( button );
            button.addActionListener(this);
           
            c.gridwidth = GridBagConstraints.REMAINDER;
            Component desc;
            if ( description instanceof String )
            {
View Full Code Here

                public Dimension getPreferredSize() {
                    return getMinimumSize();
                }
            };
            choicePanel.add(b);
            b.addActionListener(new BlockingActionListener(choices[i]));
        }
        if (icon != null) {
            add(new ImageCanvas(icon), "West"); //$NON-NLS-1$
        }
        if(buttonBarAccessory != null) {
View Full Code Here

            panel.add(textArea, BorderLayout.CENTER);
            Panel buttonPanel = new Panel(new FlowLayout(FlowLayout.RIGHT));
            buttonPanel.setBackground(Color.gray);
            buttonPanel.setForeground(Color.black);
            Button clear = new Button(Messages.getString("ConsoleOutputStream.actions.clear")); //$NON-NLS-1$
            clear.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    clear();
                }
            });
            buttonPanel.add(clear);
View Full Code Here

                    clear();
                }
            });
            buttonPanel.add(clear);
            Button close = new Button(Messages.getString("ConsoleOutputStream.actions.close")); //$NON-NLS-1$
            close.addActionListener(new ActionListener() {
                public void actionPerformed(ActionEvent evt) {
                    frame.setVisible(false);
                }
            });
            buttonPanel.add(close);
View Full Code Here

        Button b;

        b = new Button("Clr");

        b.setActionCommand("Clear");
        b.addActionListener(new ActionListener() {

            public void actionPerformed(ActionEvent e) {

                ConnectionDialogCommon.deleteRecentConnectionSettings();
View Full Code Here

        pText.add(mPassword);

        b = new Button("Ok");

        b.setActionCommand("ConnectOk");
        b.addActionListener(this);
        pButton.add(b);

        b = new Button("Cancel");

        b.setActionCommand("ConnectCancel");
View Full Code Here

        pButton.add(b);

        b = new Button("Cancel");

        b.setActionCommand("ConnectCancel");
        b.addActionListener(this);
        pButton.add(b);
        add("East", createLabel(""));
        add("West", createLabel(""));

        mError = new Label("");
View Full Code Here

          pluginLoader.broadcast(new ReturnFocusRequest());
          close.setLabel(startText != null ? stopText : "Disconnect");
        } else
          close.setLabel(startText != null ? startText : "Connect");

        close.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent evt) {
            if (((JFrame) appletFrame).isVisible()) {
              pluginLoader.broadcast(new SocketRequest());
              ((JFrame) appletFrame).setVisible(false);
              close.setLabel(startText != null ? startText : "Connect");
View Full Code Here

   
    this.data = new TextField(60);
    this.add(this.data);
   
    Button push_button = new Button("push");
    push_button.addActionListener(new pushListener(s, this));
    this.add(push_button);
    Button pop_button = new Button("pop");
    pop_button.addActionListener(new popListener(s, this));
    this.add(pop_button);
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.