JFrame.EXIT_ON_CLOSE instead of WindowConstants.EXIT_ON_CLOSE

Hi,

Using Idea 12.1 on Linux. I use the UI Designer to create an elementary form. When I commit the code, the Inspector raises several warnings:

- No label specified for component
- Missing mnemonic: Calculate
- Must be one of: WindowConstants.DO_NOTHING_ON_CLOSE, WindowConstants.HIDE_ON_CLOSE, WindowConstants.DISPOSE_ON_CLOSE, WindowConstants.EXIT_ON_CLOSE

Question: Could the UI Designer generates the code to autofix these warnings? In particular, why would the code generates frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); while the code inspector expects it to be WindowConstants.EXIT_ON_CLOSE ?

2 comments

Actually these messages are not warnings but inspections, pieces of advice that you can switch on and off.

0

Please sign in to leave a comment.