craftleft.gif (3002 bytes)QuickTable
Home | API | Tutorial | Download | Support | Contact topblack.gif (108 bytes)


QuickTable User Cp  |  Register  |  Members  |  Search  |  Help
    |- QuickTable Discussion Forums > General QuickTable Support/Help Post New Topic   Post A Reply
QuickTable with popupmenu printer friendly version
next newest post | next oldest post
Author Messages
Amb
Private First Class

Gender: Male
Location:
Registered: Mar 2005
Status: Offline
Posts: 11

Click here to see the profile for Amb Send email to Amb Send private message to Amb Find more posts by Amb Edit or delete this message Reply w/Quote
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

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
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

Click here to see the profile for Amb Send email to Amb Send private message to Amb Find more posts by Amb Edit or delete this message Reply w/Quote
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

Click here to see the profile for Amb Send email to Amb Send private message to Amb Find more posts by Amb Edit or delete this message Reply w/Quote
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

Click here to see the profile for Amb Send email to Amb Send private message to Amb Find more posts by Amb Edit or delete this message Reply w/Quote
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

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
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

Click here to see the profile for baric Send email to baric Send private message to baric Find more posts by baric Edit or delete this message Reply w/Quote
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

Click here to see the profile for Admin Send email to Admin Send private message to Admin Find more posts by Admin Edit or delete this message Reply w/Quote
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");


Post New Topic   Post A Reply Jump to:
Contact Us | QuickTable - A Java DBGrid | Privacy Policy All times are GMT -5 Hours.
Welcome to QuickTable Forums, Guest!  
Login
Username :
Password :
In order to fully utilize the abilities of this board, you are required to register as a member. Registration is free, and allows you to do lots of things including turning on or off certain features of this board. Register now!
Powered by CuteCast v2.0 BETA 2
Copyright © 2001-2003 ArtsCore Studios