Comment trapper un evenement MouseEvent issu de javax.swing.plaf.basic.BasicTableUI$Handler

P

philippe.bodard

Bonjour,
Dans un cas particulier , apres un clic dans une cellule gérée par
JTable , j'ai une exception issu du
handler de la table .
J'aimerai pourvoir etre capable de trapper cet evenement avant qu'il
soit pris en compte par le handler de la table





Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(Unknown
Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)



ci joint le source de la classe JTableModule qui gere la table
J'esperai trapper l'évènement via un MouseHandler que je rajoute à ma
classe JTableModule .
Je le traite mais cependant malgré le dispose() , il est quand meme
pris en compte par le BasicTableUI$Handler
D'ou ma problématique .
Trapper cet évènement pour identifier pourquoi la source est invalide
avant qu,il soit pris en compte par BasicTableUI$Handler

Merci



package terri.gui.table;

/*
@(#)JTableModule.java 1.17 07/10/26
*
*/

import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import javax.swing.plaf.basic.BasicTableUI;

import terri.InvokerUI;
import terri.entities.*;
import terri.gui.MessageWindow;
import terri.managers.file.*;
import terri.utilities.*;

import java.lang.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.awt.event.*;
import java.awt.*;
import java.beans.*;




public class JTableModule extends JTable {

JScrollPane scrollPane;
TableColumn tableColumn0;

final int columnWidth0 = 30;

Logger logger;

JTableModule jTableModule;

TableColumnModel tableColumnModel;

MouseListener[] mls;



class MyTableUI extends BasicTableUI {


public MouseInputListener createMouseInputListener() {

return mouseHandler;
}

}

MyTableUI myTableUI;

class MouseHandler extends MouseInputAdapter {


public void mousePressed(MouseEvent e) {

logger.log(Level.INFO,"source =" + e.getSource().toString());
if (!e.getComponent().isValid()) {
logger.log(Level.INFO,"Component Source invalid, evt
consumed");
e.consume();
}
else
super.mousePressed(e);
logger.log(Level.INFO,"Mouse pressed (# of clicks: "
+ e.getClickCount() + ")");

}

public void mouseReleased(MouseEvent e) {

logger.log(Level.INFO,"source =" + e.getSource().toString());
if (!e.getComponent().isValid()) {
logger.log(Level.INFO,"Component Source invalide, evt
consumed");
e.consume();
}
else
super.mouseReleased(e);
logger.log(Level.INFO,"Mouse released (# of clicks: "
+ e.getClickCount() + ")");

}


}

MouseHandler mouseHandler;

class ListSelectionModelTableModule extends DefaultListSelectionModel
{

public boolean isSelectedIndex(int index) {
boolean result;
result=super.isSelectedIndex(index);
if (listSelectionColumnModel.getAnchorSelectionIndex() != 0) {
result=false;
}
// logger.log(Level.INFO,"isSelected (" + index + ") result = " +
result);
return result;
}

}


ListSelectionModelTableModule listSelectionRowModelTableModule;
ListSelectionModel listSelectionColumnModel;


//Default cell editor
DefaultCellEditor cellEditor = new DefaultCellEditor(new
JTextField()) {
public void cancelCellEditing() {
logger.log(Level.INFO,"cancel editing");
super.cancelCellEditing();
}
public boolean stopCellEditing() {
logger.log(Level.INFO,"stop editing");
return super.stopCellEditing();
}

public Component getTableCellEditorComponent(JTable table, Object
value, boolean isSelected, int row, int column){
logger.log(Level.INFO,"getTableCellEditorComponent with value : " +
value + " row :" + row + " column :" + column);
return super.getTableCellEditorComponent(table, value, isSelected,
row,column);
}


};

// Cell renderer used by column 0 with specifics background and
foreground colors.
DefaultTableCellRenderer col0Renderer =
new DefaultTableCellRenderer() {
Color beige = new Color(245, 245, 220);
public void setValue(Object value) {
setBackground(beige);
setForeground(Color.black);
super.setValue(value);
}
};

public JTableModule(AbstractTableModel dataModel) {

int indexMouseListener;

//logger
logger= Logger.getLogger("terri.gui.table.JTableModule");

//set the common log file handler
logger.addHandler(InvokerUI.getCommonLogFileHandler());

//initialize the list , index of the model
logger.log(Level.INFO,"new JTableModule");

//Affect the tableModel
setModel(dataModel);
logger.log(Level.INFO,"setModel");

//Column0 specifications
specifyColumn0();
logger.log(Level.INFO,"specifyColumn0");

//specific editor
//this.setCellEditor(cellEditor);

putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
logger.log(Level.INFO,"putClientProperty");


//list selection model for excel selection row behavior
jTableModule=this;
tableColumnModel=this.getColumnModel();
listSelectionColumnModel=tableColumnModel.getSelectionModel();
listSelectionRowModelTableModule= new
ListSelectionModelTableModule();
this.setSelectionModel(listSelectionRowModelTableModule);


//selection behavior
this.setRowSelectionAllowed(true);
this.setCellSelectionEnabled(true);
this.setColumnSelectionAllowed(false);


//mouse Handler for TableUI
//mouseHandler=new MouseHandler();
//this.setUI(myTableUI);


//trap mouse events for debugging
/*
mouseHandler=new MouseHandler();
mls = (MouseListener[])
(this.getListeners(MouseListener.class));
for (indexMouseListener=0;indexMouseListener<
mls.length;indexMouseListener++)
this.removeMouseListener(mls[indexMouseListener]);
this.addMouseListener(mouseHandler);
*/

// Affect a scrollPane
scrollPane = new JScrollPane(this);
logger.log(Level.INFO,"fin new JTableModule");

};

public JScrollPane getScrollPane() { return scrollPane; }


//render specifications for column 0
private void specifyColumn0() {

// max size and not resizable with gray color
tableColumn0= this.getColumn(" ");
tableColumn0.setMaxWidth(columnWidth0);
tableColumn0.setResizable(false);
tableColumn0.setCellRenderer(col0Renderer);

}

//special views behaviours to add
public void tableChanged(TableModelEvent e ) {

super.tableChanged(e);
}



}
 
R

Roedy Green

On Sat, 20 Oct 2007 12:51:47 -0700, (e-mail address removed)

Here is a translation based on my high school French and Babelfish..
Please take it with a large grain of salt:

Bonjour,
Dans un cas particulier , apres un clic dans une cellule gérée par
JTable , j'ai une exception issu du
handler de la table .
J'aimerai pourvoir etre capable de trapper cet evenement avant qu'il
soit pris en compte par le handler de la table


Good day.

In one particular case, after I click in a cell managed by JTable, I
am getting an exception originating in the JTable handler. I would
like to be able to intercept the event before it reaches the JTable
handler.
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(Unknown
Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)



ci joint le source de la classe JTableModule qui gere la table
J'esperai trapper l'évènement via un MouseHandler que je rajoute à ma
classe JTableModule .
Je le traite mais cependant malgré le dispose() , il est quand meme
pris en compte par le BasicTableUI$Handler
D'ou ma problématique .
Trapper cet évènement pour identifier pourquoi la source est invalide
avant qu,il soit pris en compte par BasicTableUI$Handler

Merci

Here is the source for the JTableModule class which control the table.
I hope it will intercept the event via a MouseHandler that I add
with my JTableModule class. I treat? it but however in spite of the
dispose(), it behaves the same way by BasicTableUI$Handler. It is
important to intercept this event to identify why the source is
invalid, before it is processed by BasicTableUI$Handler

Thanks
package terri.gui.table;

/*
@(#)JTableModule.java 1.17 07/10/26
*
*/

import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import javax.swing.plaf.basic.BasicTableUI;

import terri.InvokerUI;
import terri.entities.*;
import terri.gui.MessageWindow;
import terri.managers.file.*;
import terri.utilities.*;

import java.lang.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.awt.event.*;
import java.awt.*;
import java.beans.*;




public class JTableModule extends JTable {

JScrollPane scrollPane;
TableColumn tableColumn0;

final int columnWidth0 = 30;

Logger logger;

JTableModule jTableModule;

TableColumnModel tableColumnModel;

MouseListener[] mls;



class MyTableUI extends BasicTableUI {


public MouseInputListener createMouseInputListener() {

return mouseHandler;
}

}

MyTableUI myTableUI;

class MouseHandler extends MouseInputAdapter {


public void mousePressed(MouseEvent e) {

logger.log(Level.INFO,"source =" + e.getSource().toString());
if (!e.getComponent().isValid()) {
logger.log(Level.INFO,"Component Source invalid, evt
consumed");
e.consume();
}
else
super.mousePressed(e);
logger.log(Level.INFO,"Mouse pressed (# of clicks: "
+ e.getClickCount() + ")");

}

public void mouseReleased(MouseEvent e) {

logger.log(Level.INFO,"source =" + e.getSource().toString());
if (!e.getComponent().isValid()) {
logger.log(Level.INFO,"Component Source invalide, evt
consumed");
e.consume();
}
else
super.mouseReleased(e);
logger.log(Level.INFO,"Mouse released (# of clicks: "
+ e.getClickCount() + ")");

}


}

MouseHandler mouseHandler;

class ListSelectionModelTableModule extends DefaultListSelectionModel
{

public boolean isSelectedIndex(int index) {
boolean result;
result=super.isSelectedIndex(index);
if (listSelectionColumnModel.getAnchorSelectionIndex() != 0) {
result=false;
}
// logger.log(Level.INFO,"isSelected (" + index + ") result = " +
result);
return result;
}

}


ListSelectionModelTableModule listSelectionRowModelTableModule;
ListSelectionModel listSelectionColumnModel;


//Default cell editor
DefaultCellEditor cellEditor = new DefaultCellEditor(new
JTextField()) {
public void cancelCellEditing() {
logger.log(Level.INFO,"cancel editing");
super.cancelCellEditing();
}
public boolean stopCellEditing() {
logger.log(Level.INFO,"stop editing");
return super.stopCellEditing();
}

public Component getTableCellEditorComponent(JTable table, Object
value, boolean isSelected, int row, int column){
logger.log(Level.INFO,"getTableCellEditorComponent with value : " +
value + " row :" + row + " column :" + column);
return super.getTableCellEditorComponent(table, value, isSelected,
row,column);
}


};

// Cell renderer used by column 0 with specifics background and
foreground colors.
DefaultTableCellRenderer col0Renderer =
new DefaultTableCellRenderer() {
Color beige = new Color(245, 245, 220);
public void setValue(Object value) {
setBackground(beige);
setForeground(Color.black);
super.setValue(value);
}
};

public JTableModule(AbstractTableModel dataModel) {

int indexMouseListener;

//logger
logger= Logger.getLogger("terri.gui.table.JTableModule");

//set the common log file handler
logger.addHandler(InvokerUI.getCommonLogFileHandler());

//initialize the list , index of the model
logger.log(Level.INFO,"new JTableModule");

//Affect the tableModel
setModel(dataModel);
logger.log(Level.INFO,"setModel");

//Column0 specifications
specifyColumn0();
logger.log(Level.INFO,"specifyColumn0");

//specific editor
//this.setCellEditor(cellEditor);

putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
logger.log(Level.INFO,"putClientProperty");


//list selection model for excel selection row behavior
jTableModule=this;
tableColumnModel=this.getColumnModel();
listSelectionColumnModel=tableColumnModel.getSelectionModel();
listSelectionRowModelTableModule= new
ListSelectionModelTableModule();
this.setSelectionModel(listSelectionRowModelTableModule);


//selection behavior
this.setRowSelectionAllowed(true);
this.setCellSelectionEnabled(true);
this.setColumnSelectionAllowed(false);


//mouse Handler for TableUI
//mouseHandler=new MouseHandler();
//this.setUI(myTableUI);


//trap mouse events for debugging
/*
mouseHandler=new MouseHandler();
mls = (MouseListener[])
(this.getListeners(MouseListener.class));
for (indexMouseListener=0;indexMouseListener<
mls.length;indexMouseListener++)
this.removeMouseListener(mls[indexMouseListener]);
this.addMouseListener(mouseHandler);
*/

// Affect a scrollPane
scrollPane = new JScrollPane(this);
logger.log(Level.INFO,"fin new JTableModule");

};

public JScrollPane getScrollPane() { return scrollPane; }


//render specifications for column 0
private void specifyColumn0() {

// max size and not resizable with gray color
tableColumn0= this.getColumn(" ");
tableColumn0.setMaxWidth(columnWidth0);
tableColumn0.setResizable(false);
tableColumn0.setCellRenderer(col0Renderer);

}

//special views behaviours to add
public void tableChanged(TableModelEvent e ) {

super.tableChanged(e);
}



}
 
P

philippe.bodard

On Sat, 20 Oct 2007 12:51:47 -0700, (e-mail address removed)

Here is a translation based on my high school French and Babelfish..
Please take it with a large grain of salt:
Bonjour,
Dans un cas particulier , apres un clic dans une cellule gérée par
JTable , j'ai une exception issu du
handler de la table .
J'aimerai pourvoir etre capable de trapper cet evenement avant qu'il
soit pris en compte par le handler de la table

Good day.

In one particular case, after I click in a cell managed by JTable, I
am getting an exception originating in the JTable handler. I would
like to be able to intercept the event before it reaches the JTable
handler.




Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(Unknown
Source)
at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
ci joint le source de la classe JTableModule qui gere la table
J'esperai trapper l'évènement via un MouseHandler que je rajoute à ma
classe JTableModule .
Je le traite mais cependant malgré le dispose() , il est quand meme
pris en compte par le BasicTableUI$Handler
D'ou ma problématique .
Trapper cet évènement pour identifier pourquoi la source est invalide
avant qu,il soit pris en compte par BasicTableUI$Handler

Here is the source for the JTableModule class which control the table.
I hope it will intercept the event via a MouseHandler that I add
with my JTableModule class. I treat? it but however in spite of the
dispose(), it behaves the same way by BasicTableUI$Handler. It is
important to intercept this event to identify why the source is
invalid, before it is processed by BasicTableUI$Handler

Thanks




package terri.gui.table;
/*
@(#)JTableModule.java 1.17 07/10/26
*
*/
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.table.*;
import javax.swing.plaf.basic.BasicTableUI;
import terri.InvokerUI;
import terri.entities.*;
import terri.gui.MessageWindow;
import terri.managers.file.*;
import terri.utilities.*;
import java.lang.*;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.awt.event.*;
import java.awt.*;
import java.beans.*;
public class JTableModule extends JTable {
JScrollPane scrollPane;
TableColumn tableColumn0;
final int columnWidth0 = 30;
Logger logger;
JTableModule jTableModule;
TableColumnModel tableColumnModel;
MouseListener[] mls;
class MyTableUI extends BasicTableUI {
public MouseInputListener createMouseInputListener() {
return mouseHandler;
}

MyTableUI myTableUI;
class MouseHandler extends MouseInputAdapter {
public void mousePressed(MouseEvent e) {
logger.log(Level.INFO,"source =" + e.getSource().toString());
if (!e.getComponent().isValid()) {
logger.log(Level.INFO,"Component Source invalid, evt
consumed");
e.consume();
}
else
super.mousePressed(e);
logger.log(Level.INFO,"Mouse pressed (# of clicks: "
+ e.getClickCount() + ")");

public void mouseReleased(MouseEvent e) {
logger.log(Level.INFO,"source =" + e.getSource().toString());
if (!e.getComponent().isValid()) {
logger.log(Level.INFO,"Component Source invalide, evt
consumed");
e.consume();
}
else
super.mouseReleased(e);
logger.log(Level.INFO,"Mouse released (# of clicks: "
+ e.getClickCount() + ")");


MouseHandler mouseHandler;
class ListSelectionModelTableModule extends DefaultListSelectionModel
{
public boolean isSelectedIndex(int index) {
boolean result;
result=super.isSelectedIndex(index);
if (listSelectionColumnModel.getAnchorSelectionIndex() != 0) {
result=false;
}
// logger.log(Level.INFO,"isSelected (" + index + ") result = " +
result);
return result;
}

ListSelectionModelTableModule listSelectionRowModelTableModule;
ListSelectionModel listSelectionColumnModel;
//Default cell editor
DefaultCellEditor cellEditor = new DefaultCellEditor(new
JTextField()) {
public void cancelCellEditing() {
logger.log(Level.INFO,"cancel editing");
super.cancelCellEditing();
}
public boolean stopCellEditing() {
logger.log(Level.INFO,"stop editing");
return super.stopCellEditing();
}
public Component getTableCellEditorComponent(JTable table, Object
value, boolean isSelected, int row, int column){
logger.log(Level.INFO,"getTableCellEditorComponent with value : " +
value + " row :" + row + " column :" + column);
return super.getTableCellEditorComponent(table, value, isSelected,
row,column);
}

// Cell renderer used by column 0 with specifics background and
foreground colors.
DefaultTableCellRenderer col0Renderer =
new DefaultTableCellRenderer() {
Color beige = new Color(245, 245, 220);
public void setValue(Object value) {
setBackground(beige);
setForeground(Color.black);
super.setValue(value);
}
};
public JTableModule(AbstractTableModel dataModel) {
int indexMouseListener;
//logger
logger= Logger.getLogger("terri.gui.table.JTableModule");
//set the common log file handler
logger.addHandler(InvokerUI.getCommonLogFileHandler());
//initialize the list , index of the model
logger.log(Level.INFO,"new JTableModule");
//Affect the tableModel
setModel(dataModel);
logger.log(Level.INFO,"setModel");
//Column0 specifications
specifyColumn0();
logger.log(Level.INFO,"specifyColumn0");
//specific editor
//this.setCellEditor(cellEditor);
putClientProperty("terminateEditOnFocusLost", Boolean.TRUE);
logger.log(Level.INFO,"putClientProperty");
//list selection model for excel selection row behavior
jTableModule=this;
tableColumnModel=this.getColumnModel();
listSelectionColumnModel=tableColumnModel.getSelectionModel();
listSelectionRowModelTableModule= new
ListSelectionModelTableModule();
this.setSelectionModel(listSelectionRowModelTableModule);
//selection behavior
this.setRowSelectionAllowed(true);
this.setCellSelectionEnabled(true);
this.setColumnSelectionAllowed(false);
//mouse Handler for TableUI
//mouseHandler=new MouseHandler();
//this.setUI(myTableUI);
//trap mouse events for debugging
/*
mouseHandler=new MouseHandler();
mls = (MouseListener[])
(this.getListeners(MouseListener.class));
for (indexMouseListener=0;indexMouseListener<
mls.length;indexMouseListener++)
this.removeMouseListener(mls[indexMouseListener]);
this.addMouseListener(mouseHandler);
*/
// Affect a scrollPane
scrollPane = new JScrollPane(this);
logger.log(Level.INFO,"fin new JTableModule");

public JScrollPane getScrollPane() { return scrollPane; }
//render specifications for column 0
private void specifyColumn0() {
// max size and not resizable with gray color
tableColumn0= this.getColumn(" ");
tableColumn0.setMaxWidth(columnWidth0);
tableColumn0.setResizable(false);
tableColumn0.setCellRenderer(col0Renderer);

//special views behaviours to add
public void tableChanged(TableModelEvent e ) {

}

--
Roedy Green Canadian Mind Products
The Java Glossaryhttp://mindprod.com- Masquer le texte des messages précédents -

- Afficher le texte des messages précédents -- Masquer le texte des messages précédents -

- Afficher le texte des messages précédents -

Thank you very much Roedy for you translation
It explains very well my needs
I am waiting now for any idea to solve my problem
bye
Philip
 
S

Sabine Dinis Blochberger

Roedy said:
On Sat, 20 Oct 2007 12:51:47 -0700, (e-mail address removed)

Here is a translation based on my high school French and Babelfish..
Please take it with a large grain of salt:




Good day.

In one particular case, after I click in a cell managed by JTable, I
am getting an exception originating in the JTable handler. I would
like to be able to intercept the event before it reaches the JTable
handler.
You can use e.consume() to stop it bubbling up through the component
hierarchy after you're done with it.
 
P

philippe.bodard

You can use e.consume() to stop it bubbling up through the component
hierarchy after you're done with it.
--
Sabine Dinis Blochberger

Op3racionalwww.op3racional.eu- Masquer le texte des messages précédents -

- Afficher le texte des messages précédents -

despite the fact that i have consumed the event , it is processed by
the AWTEventMulticaster of the BasicTableUI.
I have not found a way to cath this wrong MouseEvent in the
BasicTableUI.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top