Editable or non editable?(jtable java)?
-
i have a frame that has 3 button and a jtable i want my program to be like this: when i havnt clicked button2 my jtable be un editable and when i click it it becomes editable!i have made it un editable in the first place with this code: table = new JTable(_data, _titles){ public boolean isCellEditable(int rowIndex, int colIndex) { return false; //Disallow the editing of any cell } }; but i dont know how i can make it editable in my secound button again!
-
Answer:
What are you using as the editor component? If using a JTextArea, you could do something like this: table1 = new JTable(); . // other code . textarea1 = (JTextArea) table1.getEditorComponent(); textarea1.setEditable(false);
Yasy at Yahoo! Answers Visit the source
Related Q & A:
- How to add data to the Jtable?Best solution by Stack Overflow
- How to Implement Gateway Service something similar to Oracle API gateway Using Java and Java based Open Source frameworks only?Best solution by Quora
- How to filter single column in a jtable?Best solution by Stack Overflow
- How to show data in database with a JTable?Best solution by java-tips.org
- Difference between Java 2 and Java 6?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.