Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Below we describe the recommended way, but nothing prevents you from using any other technique.

First define the methods which will be called by ??? in response to an event on your components. In this example we define the methods that will be called in response to changing the active tab of the tab panel (topTabChanged) and define the method that will be called in response to some component being activated. Note that the names of these methods is up to you. You will connect the method to the event later.

  • Extend BasicFrameListener by overriding the default behavior and/or adding your own methods, e.g.
    Code Block
    public class MyFrameListener extends BasicFrameListener {
    
    	@Override
    	public void topTabChanged(ChangeEvent e) {
    		System.out.println("Tab changed");
    	}
    	
    	public void myComponentActivated(EventObject e){
    		System.out.println("My component activated");
    	}
    }
    

...