Package java.awt

Examples of java.awt.Button.addActionListener()


        b = new java.awt.Button("Close");
        b.setFont(font);

        buttons.add(b);
        b.addActionListener(new java.awt.event.ActionListener() {
            @Override
            public void actionPerformed(final ActionEvent e) {
                closeDialog();
            }
        });
View Full Code Here


         gb.setConstraints(pp, constr);
         constr.gridwidth = 1;
         constr.weightx = 1.0;
         Button b;
         p.add(b = new Button("  OK  "));
         b.addActionListener(new Ok());
         constr.weightx = 1.0;
         gb.setConstraints(b, constr);
         p.add(b = new Button("Clear"));
         b.addActionListener(new Clear());
         constr.weightx = 2.0;
View Full Code Here

         p.add(b = new Button("  OK  "));
         b.addActionListener(new Ok());
         constr.weightx = 1.0;
         gb.setConstraints(b, constr);
         p.add(b = new Button("Clear"));
         b.addActionListener(new Clear());
         constr.weightx = 2.0;
         gb.setConstraints(b, constr);
         p.add(b = new Button("Cancel"));
         b.addActionListener(new Cancel());
         constr.weightx = 1.0;
View Full Code Here

         p.add(b = new Button("Clear"));
         b.addActionListener(new Clear());
         constr.weightx = 2.0;
         gb.setConstraints(b, constr);
         p.add(b = new Button("Cancel"));
         b.addActionListener(new Cancel());
         constr.weightx = 1.0;
         gb.setConstraints(b, constr);
         add("South", p);

         pack();
View Full Code Here

            center.add(new Label(message));

            // Create a panel for the 'OK' button
            Panel bottom = new Panel();
            Button okButton = new Button("   OK   ");
            okButton.addActionListener(new ButtonHandler());
            bottom.add(okButton);

            // Add the two panels to the window/frame
            add(center, BorderLayout.CENTER);
            add(bottom,BorderLayout.SOUTH);
View Full Code Here

         p.add(b = new Button("  OK  "));
         b.addActionListener(new Ok());
         constr.weightx = 1.0;
         gb.setConstraints(b, constr);
         p.add(b = new Button("Clear"));
         b.addActionListener(new Clear());
         constr.weightx = 2.0;
         gb.setConstraints(b, constr);
         p.add(b = new Button("Cancel"));
         b.addActionListener(new Cancel());
         constr.weightx = 1.0;
View Full Code Here

         p.add(b = new Button("Clear"));
         b.addActionListener(new Clear());
         constr.weightx = 2.0;
         gb.setConstraints(b, constr);
         p.add(b = new Button("Cancel"));
         b.addActionListener(new Cancel());
         constr.weightx = 1.0;
         gb.setConstraints(b, constr);
         add("South", p);

         pack();
View Full Code Here

      default_focus.addActionListener(new Accept());

      Button b;
      constr.gridwidth = GridBagConstraints.REMAINDER;
      add(b = new Button("Reject"), constr);
      b.addActionListener(new Reject());

      constr.weightx = 0.0;
      p = new Separator();
      constr.fill = GridBagConstraints.HORIZONTAL;
      add(p, constr);
View Full Code Here

      constr.anchor = GridBagConstraints.CENTER;
      constr.gridwidth = 1;
      constr.weightx = 1.0;
      add(b = new Button("Accept All"), constr);
      b.addActionListener(new AcceptDomain());

      constr.gridwidth = GridBagConstraints.REMAINDER;
      add(b = new Button("Reject All"), constr);
      b.addActionListener(new RejectDomain());
View Full Code Here

      add(b = new Button("Accept All"), constr);
      b.addActionListener(new AcceptDomain());

      constr.gridwidth = GridBagConstraints.REMAINDER;
      add(b = new Button("Reject All"), constr);
      b.addActionListener(new RejectDomain());

      pack();

      constr.anchor = GridBagConstraints.WEST;
      constr.gridwidth = GridBagConstraints.REMAINDER;
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.