Package javax.swing

Examples of javax.swing.JTable.columnAtPoint()


          //listen for thought mouse events
            table.addMouseListener(new MouseAdapter() {           
                @Override
                public void mouseClicked(MouseEvent e) {
                    Point pnt = e.getPoint();
                    int columnModelIndex = table.convertColumnIndexToModel(table.columnAtPoint(pnt));
                    int rowModelIndex = table.convertRowIndexToModel(table.rowAtPoint(pnt));
                    // click on favorite column
                    // start favorite action                   
                    if (columnModelIndex == tableProperties.getFavoriteColIndex()){                     
                      if (actionCounter < maxSameTimeActions){
View Full Code Here


    String toolTipText;
    if (component instanceof JTable)
    {
      JTable table = (JTable)component;
      int row = table.rowAtPoint(event.getPoint());
      int column = table.columnAtPoint(event.getPoint());
      if (row != -1 && column != -1)
      {
        TableCellRenderer renderer = table.getCellRenderer(row, column);
        Component comp = renderer.getTableCellRendererComponent(table,
            table.getValueAt(row, column), true, true, row, column);
View Full Code Here

          public void mouseClicked(MouseEvent e) {
                        if( e.getClickCount() < 2 )
                            return;
                        JTable table = (JTable)e.getSource();
                        int row = table.rowAtPoint(e.getPoint()),
                            col = table.columnAtPoint(e.getPoint());
//                        System.out.println(row + ":"+col);
                        if( row>=0 && col>=0 )
                        {
                            col = table.convertColumnIndexToModel(col);
                            if( col == 2 )
View Full Code Here

            public void mouseClicked(MouseEvent e) {
                if (e.getClickCount() != 2) {
                    return;
                }
                JTable t = (JTable) e.getSource();
                int col = t.convertColumnIndexToModel(t.columnAtPoint(e.getPoint()));
                if (col != 4) {
                    return;
                }
                int row = t.rowAtPoint(e.getPoint());
                String url = (String) t.getValueAt(row, col);
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.