Package javax.swing

Examples of javax.swing.JButton.addMouseListener()


        this.add(tree);

        this.add(new JToolBar.Separator());
       
        bi = new JButton(Main.globalActionCollection.getAction(Constantes.ABOUT));
        bi.addMouseListener(handler);
        bi.setText("");
        this.add(bi);
/*
* suite sur la 0.76
        this.add(new JToolBar.Separator());
View Full Code Here


  @RunsInCurrentThread
  private JButton button() {
    JButton button = new JButton("Browse");
    button.setName("browse");
    button.addMouseListener(new MouseAdapter() {
      @Override
      public void mousePressed(MouseEvent e) {
        launchJFileChooser();
      }
    });
View Full Code Here

  @RunsInCurrentThread
  private JButton button() {
    JButton button = new JButton("Message");
    button.setName("message");
    button.addMouseListener(new MouseAdapter() {
      @Override
      public void mousePressed(MouseEvent e) {
        launchDialog();
      }
    });
View Full Code Here

  @RunsInCurrentThread
  private JButton windowLaunchButton() {
    JButton button = new JButton("Launch Frame");
    button.setName("launchFrame");
    button.addMouseListener(new MouseAdapter() {
      @Override
      public void mousePressed(MouseEvent e) {
        setVisible(false);
        launchWindow();
      }
View Full Code Here

  @RunsInCurrentThread
  private JButton dialogLaunchButton() {
    JButton button = new JButton("Launch Dialog");
    button.setName("launchDialog");
    button.addMouseListener(new MouseAdapter() {
      @Override
      public void mousePressed(MouseEvent e) {
        setVisible(false);
        launchDialog();
      }
View Full Code Here

  private JButton getButton(String a_strText) {
    JButton l_btnReturn = new JButton(a_strText);
    l_btnReturn.setMargin(new Insets(0, 0, 0, 0));
    l_btnReturn.addActionListener(this);
    l_btnReturn.addMouseListener(this);
    l_btnReturn.setFocusable(false);
    return l_btnReturn;
  }

  private JLabel getLabel(String a_strText) {
View Full Code Here

            JPanel checkoutPane = new JPanel();
            JButton button = new JButton( "Checkout" );
            button.setVerticalTextPosition( AbstractButton.CENTER );
            button.setHorizontalTextPosition( AbstractButton.LEADING );
            //attach handler to assert items into working memory
            button.addMouseListener( new CheckoutButtonHandler() );
            button.setActionCommand( "checkout" );
            checkoutPane.add( button );
            bottomHalf.add( checkoutPane,
                            BorderLayout.NORTH );
View Full Code Here

            button = new JButton( "Reset" );
            button.setVerticalTextPosition( AbstractButton.CENTER );
            button.setHorizontalTextPosition( AbstractButton.TRAILING );
            //attach handler to assert items into working memory
            button.addMouseListener( new ResetButtonHandler() );
            button.setActionCommand( "reset" );
            checkoutPane.add( button );
            bottomHalf.add( checkoutPane,
                            BorderLayout.NORTH );
View Full Code Here

                runnable.run();
            }
        });
        button.setHorizontalTextPosition(JButton.CENTER);
        button.setVerticalTextPosition(JButton.BOTTOM);
        button.addMouseListener(new MouseAdapter() {
           
            public void mouseEntered(MouseEvent e) {
                descriptionTextArea.setText(description);
            }
           
View Full Code Here

            JPanel checkoutPane = new JPanel();
            JButton button = new JButton( "Checkout" );
            button.setVerticalTextPosition( AbstractButton.CENTER );
            button.setHorizontalTextPosition( AbstractButton.LEADING );
            //attach handler to assert items into working memory
            button.addMouseListener( new CheckoutButtonHandler() );
            button.setActionCommand( "checkout" );
            checkoutPane.add( button );
            bottomHalf.add( checkoutPane,
                            BorderLayout.NORTH );
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.