Package javax.swing

Examples of javax.swing.JButton.addMouseListener()


        JButton btnNewButton_1 = new JButton( "" );
        btnNewButton_1.setForeground( Color.WHITE );
        btnNewButton_1.setBackground( Color.WHITE );
        btnNewButton_1.setIcon( new ImageIcon( getClass().getResource( "down.png" ) ) );
        btnNewButton_1.addMouseListener( new MoveButtonPressed( Move.MOVE_BACKWARD ) );
        btnNewButton_1.setToolTipText( "move backward" );
        movePanel.add( btnNewButton_1 );

        JPanel panel_10 = new JPanel();
        panel_10.setBackground( Color.WHITE );
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

      columnPanel.setLayout(layout);


      JButton btnColumn = new JButton("Columns");

      btnColumn.addMouseListener(new MouseListener() {

        public void mouseReleased(MouseEvent e)
        {
        }
View Full Code Here

        }


        private JButton newJButton() {
            JButton result = new JButton();
            result.addMouseListener(this);
            result.addActionListener(this);
            result.setFocusPainted(false);
            return result;
        }
View Full Code Here

        Utilities.uninstallColorsAndFont(spinner);
    }

    protected void installNextButtonListeners(final Component c) {
        JButton next = (JButton)c;
        next.addMouseListener(buttonHandler);
        next.addActionListener(buttonHandler);
        next.addFocusListener(buttonHandler);
    }

    protected void installPreviousButtonListeners(final Component c) {
View Full Code Here

        next.addFocusListener(buttonHandler);
    }

    protected void installPreviousButtonListeners(final Component c) {
        JButton previous = (JButton)c;
        previous.addMouseListener(buttonHandler);
        previous.addActionListener(buttonHandler);
        previous.addFocusListener(buttonHandler);
    }

    protected LayoutManager createLayout() {
View Full Code Here

                if ( task.isRunning())
                {
                    actionsTableModel.addRow(row);

                    stopButton.addMouseListener(new MouseAdapter()
                    {
                        public void mouseClicked(MouseEvent e)
                        {
                            task.stop();
                        }
View Full Code Here

    @Override
    public JComponent getAdditionalInfo() {
        JPanel panel = new JPanel(new GridLayout(3, 1));
        JButton butt1 = new JButton("Execute GNU Plot");
        butt1.setBackground(new Color(100, 100, 255));
        butt1.addMouseListener(new MouseListener() {
           
            @Override public void mouseReleased(MouseEvent e) {}
            @Override public void mousePressed(MouseEvent e) {}
            @Override public void mouseExited(MouseEvent e) {}
            @Override public void mouseEntered(MouseEvent e) {}
View Full Code Here

        this.expButtonsToRepsMapping = new HashMap<>();
        for (RepresentableAsGraph r : graphTypes) {
            JButton butt = new JButton(this.getRepresentableName(r) + "");
            this.exampleButtonsPanel.add(butt);
            butt.addMouseListener(this);
            this.expButtonsToRepsMapping.put(butt, r);
           
            r.setFather(this);
        }
        this.additionalInformationPanel.add(this.addInfo);
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.