I want to be able to open up the JButton class and see the code inside it. The reason is because I want to override one of the methods, but I want to make sure I include all the functionality that that method normally has. Also, it’d be a good way to learn. I know I can do it when I’ve had errors by clicking on the class in the error messages. But any ideas on how to bring it up normally?
Share
Go To | Class (Ctrl+N), type JButton (Include non-project classes checkbox will be enabled automatically if no such classes are found in your project).
If you already have
JButtonusage in your code, you can navigate to its source using Ctrl+B while the caret is on it.Of course you need sources attached to the JSDK, but it should be fine by default (as JSDK installation has sources on most platforms). If you are on Mac, you will have to download them separately and attach to the JSDK configuration in File | Project Structure | SDKs.