Author |
Messages |
Amb
Private First Class
Gender: Male
Location:
Registered: Mar 2005
Status: Offline
Posts: 11
|
Posted Tuesday, March 8, 2005 @ 12:51:29
If the QuickTabel this empty and I want that he appears popup to add a
new registry as I solve it
thanks
|
Admin
Board Owner
Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9
|
Posted Tuesday, March 8, 2005 @ 20:30:47
I asume you would like to show a popup menu with insert menu item. On clicking the menu, it should create a new record.
Try the following code
Code: | | //create a new popup
JPopupMenu popupMenu = new JPopupMenu();
//add a insert menu item to popup
JMenuItem menuItem = new JMenuItem("Insert");
menuItem.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
dBTable.insertEmptyRecord();
}
});
//add the menuitem to popup
popupMenu.add(menuItem);
//when user right clicks on quicktable show popup
dbTable1.getTable().addMouseListener(new MouseAdapter(){
public void mousePressed(MouseEvent e){
if (e.isPopupTrigger()){
popupMenu.show(e.getComponent(), e.getX(), e.getY());
}
});
|
|
|
Amb
Private First Class
Gender: Male
Location:
Registered: Mar 2005
Status: Offline
Posts: 11
|
Posted Saturday, March 12, 2005 @ 03:45:01
My QuickTabel is empty and not record and I want that he appears popup to add a
new registry as I solve it
thanks
|
Amb
Private First Class
Gender: Male
Location:
Registered: Mar 2005
Status: Offline
Posts: 11
|
Posted Tuesday, March 22, 2005 @ 08:38:42
Mi Quick Table no tiene datos es decir cero records y quiero que aparezca un PopUp para permitir ingresar un dato
pero no me lo permite .
quiero saber si tengo que ingresar minimo un record en blanco o hay otra solucion
Quisiera una respiuesta
gracias
|
Amb
Private First Class
Gender: Male
Location:
Registered: Mar 2005
Status: Offline
Posts: 11
|
Posted Tuesday, March 22, 2005 @ 08:43:59
La mia Quick Table no ha dati ovvero zero records e voglio che compaia un PopUp per permettere l'inserimento di un record.
Voglio sapere se devo inserire un record vuoto come minimo o ce un'altra soluzione.
Attendo una vostra risposta
grazie
|
Admin
Board Owner
Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9
|
Posted Tuesday, March 22, 2005 @ 22:04:59
You don't need to insert an empty record to show the popup menu. Please send me the source code by email to "support at quicktable.org", I will look into it.
Non dovete inserire un'annotazione vuota per mostrare il menu del popup. Prego trasmettami il codice sorgente dal email "support at quicktable.org", io esaminerà esso.
|
baric
Private
Gender: Male
Location:
Registered: Apr 2006
Status: Offline
Posts: 9
|
Posted Tuesday, May 9, 2006 @ 04:59:47
Quote: | | Originally posted by Admin
You don't need to insert an empty record to show the popup menu. [..]
|
|
Here's no answer given, but I got the same problem. Showing a popup via a mouseListener works only on visible columns using quicktable. If there are no columns, no popup comes up.
Could you help me ?
regards
robert
|
Admin
Board Owner
Gender: Unspecified
Location:
Registered: Jul 2003
Status: Offline
Posts: 9
|
Posted Sunday, May 14, 2006 @ 22:00:55
If you could post the code which you are using to show the popup menu I can give some ideas about why it is not working.
If you are using the code in this discussion, then add some debug statements to check whether the events are properly fired.
Code: | |
public void mousePressed(MouseEvent e){
//add the debug line
System.out.println("Received mouse event");
if (e.isPopupTrigger()){
//add the debug line
System.out.println("This is popupevent");
|
|
|