1. Proper Event Processing coderanch.comHi this is a design question more than anything. Lets say I have a JTabbedPane with 2 tabs, A & B. On tab A is a button. When I click tab A it performs some processing and then disables tab B. The only way I can think of doing this is to add a listener to the button that has a ... |
2. processing events coderanch.comHi, I am just starting with Swing and hit my first roadblock: I have a JFrame with a menu and textField. I want user to click on the menu item which is supposed to execute a set of methods. The method execution is called from "Action performed" fr the menu item and this works. e.g actionPerformed(ActionEvent ae){ method1(); textField.setText("One done"); method2(); ... |
3. Processing a Return or Enter Key coderanch.comOK. I went ahead by myself and I was able to code-up a solution for when the user presses return or enter (or when a barcode is scanned and I get a carriage return character at the end of the input). private void receive() { KAlert.showMessageDialog(this, "receive() was called"); } private class ReceiveAction implements Action { @Override public void actionPerformed(ActionEvent arg0) ... |