When you are working with Java code to create a table you can use the Jtable cell selection component for selecting cells within a table. To disable a selection in a table you must use the set Focusable(false) component. Once you add the false portion to the focus component then the table you've created will no longer have the selection capability. The process for disabling the focus in the JTable cell can be accomplished by editing your code in a plain text file.
- Skill level:
Other People Are Reading
Open the plain text file that contains the Java code you want to edit. For example, if the code you want to disable focus for is stored in a Notepad file then open the Notepad file.
Press the "CTRL" and "F" keys on your keyboard and then enter "table.setFocusable" into the text box.
Press the "Enter" key on your keyboard and then view the "table.setFocusable" component to make sure it reads, "table.setFocusable(true)" in your text file.
Use your mouse to highlight the "true" portion of the component and then enter "false" into the parenthesis.
Click the "File" option in the Notepad application and then click the "Save" option. The focus component selection will be fully disabled.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for