Home Tutorialhelp Comment Thanks for the EditDisable example!

 
 

Comment

Danai Sae-Han
Thanks for the EditDisable example!,
August 5, 2009 at 3:34 AM

[code=java]Thanks a lot for your clear example how to set the isCellEditable property of a JTable.

I just found out how to do this in Neatbeans:
- go to the visual "Design" modus
- click on your JTable, and check out its properties
- in the "Code" tab go to "Custom Create Code" and add the following lines:
new javax.swing.JTable() {
public boolean isCellEditable(int rowIndex, int colIndex) {
Object isEditable = getClientProperty("isEditable");
if (isEditable == null) { return false; }
else { return (Boolean) isEditable; }
};
}

- add a JToggleButton and add an Action Event with the following code:
if (jToggleButton1.isSelected()) {
jTable1.putClientProperty("isEditable", Boolean.TRUE);
} else {
jTable1.putClientProperty("isEditable", Boolean.FALSE);
}

Now your table will be uneditable by default, but when you click on your toggle button, editing will be enabled. Mutatis mutandis when you click on that button again, obviously.

Once again, thanks! I'm just a Java newbie, and examples like this one do a lot to get me on track.

Cheerio


--
Danai
[/code]
View All Comments
Advertisement
Related Tutorial and Articles
Java Beginners

Swing Button Example
Swing Button Example  Hi, How to create an example of Swing button in Java? Thanks   Hi, Check the example at How to Create Button on Frame?. Thanks 

Java Beginners

Thanks - Java Beginners
Thanks  Hi Rajnikant, Thanks for reply..... I am... is the advantage of interface and what is the use of interface... Thanks... from unrelated classes just to get the required functionality. For example, let 

Java Beginners

Thanks - Java Beginners
Thanks  Hi, Thanks ur sending url is correct..And fullfill... and send me... Thanks once again...for sending scjp link  Hi friend...("MySQL Connect Example."); Connection conn = null; String url = "jdbc:mysql 

Swing AWT

java swing - Swing AWT
: http://www.roseindia.net/java/example/java/swing/ Thanks...java swing  how to add image in JPanel in Swing?  Hi Friend, Try the following code: import java.awt.*; import java.awt.image. 

Java Beginners

FTP Java example
FTP Java example  Where is the FTP Java example on your website? I am... functionality in my Java based application. My application is swing based and I have... examples of FTP at: FTP Programming in Java tutorials with example code. Thaks 

Java-Tutorials

Java Swing : JLabel Example
In this tutorial, you will learn how to create a label in java swing 

Java Beginners

Swing - Java Beginners
: http://www.roseindia.net/java/example/java/swing/ http://www.roseindia.net/java/example/java/awt/ Hope that it will be helpful for you. Thanks... links: http://www.grandt.com/sbe/ http://www.javafaq.nu/java/free-swing-book 

Java Beginners

java swing.
java swing.  Hi How SetBounds is used in java programs.The values in the setBounds refer to what? ie for example setBounds(30,30,30,30) and in that the four 30's refer to what 

Java-Tutorials

Java Swing : JFrame Example
Java Swing : JFrame Example In this section, you will learn how to create a frame in java swing. JFrame : JFrame class is defined in javax.swing.JFrame....(), getGlassPane(), getJMenuBar() etc.. Example : import java.awt.Dimension; import 

Swing AWT

java swings - Swing AWT
. http://www.roseindia.net/java/example/java/swing/draw-simple-bar...java swings  I am doing a project for my company. I need a to show... write the code for bar charts using java swings.  Hi friend, I am 

Java Beginners

Java swing - Java Beginners
Java swing  Hi, I want to copy the file from one directory... will be displayed in the page and progress bar also. Example, I have 10 files... will be displayed. Please send the sample code ,its very very urgent. Thanks 

Swing AWT

Date picker in Java Swing
in need of Time Picker just like the Date picker available in java Swing. Kindly... link: Java Date Time Picker Example   Hello Sir, Thank... thoroughly . But Sir, I want Time Picker In java swing desktop application 

Swing AWT

Java Dialogs - Swing AWT
visit the following links: http://www.roseindia.net/java/example/java/swing/GrideComponents.shtml http://www.roseindia.net/tutorial/java/swing/springlayout.html http://www.roseindia.net/java/example/java/awt/borderlayout-example 

Java Beginners

java swing in netbeans
java swing in netbeans  how can create sub menu in java swing using...[]) { JFrame frame = new JFrame("MenuSample Example... backwardMenuItem = new JMenuItem("Java"); newmenu.add(backwardMenuItem 

Java Beginners

Java FTP Client Example
Java FTP Client Example  How to write Java FTP Client Example code? Thanks   Hi, Here is the example code of simple FTP client in Java which downloads image from server FTP Download file example. Thanks 

Java-Tutorials

Swing Applet Example in java
Java - Swing Applet Example in java   ... swing in an applet. In this example, you will see that how resources of swing..., this is swing label which shows the message in first time This is the Swing 

Swing AWT

java - Swing AWT
/java/example/java/swing/AddRemoveItemFromCombo.shtml Thanks  Hi Friend...(String[] args) { AddComboBoxItem add=new AddComboBoxItem(); } } Thanks 

Java-Tutorials

Java Swing : JButton Example
Java Swing : JButton Example In this section we will discuss how to create button by using JButton in swing framework. JButton : JButton Class extends... property to a value according to present look and feel. Example 

Swing AWT

Swing - Swing AWT
information, visit the following link: http://www.roseindia.net/java/example/java/swing/get_jtextfield_value_from_anothe.shtml Thanks 

Swing AWT

tree - Swing AWT
visit the following code: http://www.roseindia.net/java/example/java/swing/TreeComponent.shtml http://www.roseindia.net/java/example/java/swing/AddNodes.shtml http://www.roseindia.net/java/example/java/swing/RemoveNodes.shtml Thanks 

Swing AWT

java-swings - Swing AWT
://www.roseindia.net/java/example/java/swing/ Thanks. Amardeep...java-swings  How to move JLabel using Mouse? Here the problem is i have a set of labels in a panel. I want to arrange them in a customized order 

Java Beginners

Java FTP Example
Java FTP Example  Is there any java ftp example and tutorials available on roseindia.net? Thanks   Hello, There are many examples and tutorials that teaches you how to user FTP in your Java project. Most commonly 

Java Beginners

Problem in card demo example.
://www.roseindia.net/tutorial/java/swing/dragImage.html http://www.roseindia.net/java/example/java/swing/drag-drop.shtml   I have checked all the links, thanks...Problem in card demo example.  Hi, I have successfully shows 

Java Beginners

freemarker example - Java Beginners
an example for freemarker. i want to get the values from java and display those values in the page designed using freemarker(how to get the values from java). and please provide an example with code and directory structure. send me ASAP 

Java Beginners

Java swing code - Java Beginners
in Swing. We have a huge amount of good examples on JTable here. http://www.roseindia.net/java/example/java/swing I hope this would be helpful to you...Java swing code  How to set a font for a particular cell in JTable 

Swing AWT

Java - Swing AWT
Java    Hi friend,read for more information,http://www.roseindia.net/java/example/java/swing 

Swing AWT

Need Help with Java-SWING progrmming - Swing AWT
://www.roseindia.net/java/example/java/swing/Print.shtml Thanks...Need Help with Java-SWING progrmming  Hi sir, I am a beginner in java-swing programming. I want to know how we can use the print option 

Java Beginners

Example Code - Java Beginners
Example Code  I want simple Scanner Class Example in Java and WrapperClass Example. What is the Purpose of Wrapper Class and Scanner Class . when i compile the Scanner Class Example the error occur : Can not Resolve symbol 

Programming Tutorials

ajax example
Example Ajax Login Example Thanks Ajax Tutorials  Collection of top..., I am looking for ajax post example. Thanks   Hi, You can...Ajax Example Here is the list of few Ajax examples at RoseIndia.net. Ajax 

Java Beginners

JAVA SWING JTabbedPane - Java Beginners
JAVA SWING JTabbedPane  Hi all, I would like to ask a question... to right order. Many thanks. Jun   Hi friend... = makeTextPanel("Java Tutorial"); tabbedPane.addTab("One", icon, panel1, "Does 

Java Beginners

Thanks - Java Beginners
Thanks  Hi, Thanks for reply I m solve this problem   Hi ragini, Thanks for visiting roseindia.net site 

Swing AWT

java - Swing AWT
information, http://www.roseindia.net/java/example/java/awt/ Thanks 

Java Beginners

Java File Management Example
of file. Read the example Read file in Java for more information on reading...Java File Management Example  Hi, Is there any ready made API in Java for creating and updating data into text file? How a programmer can write code 

Java Beginners

Thanks to Amardeep - Java Beginners
Thanks to Amardeep  i don't know how to thank you Amar! i real thank for what you did' i mean what you did is really my pressure, thanks.... thanks Amardeep. 2hafeni 

Java Beginners

Thanks to Amardeep - Java Beginners
Thanks to Amardeep  i don't know how to thank you Amar! i real thank for what you did' i mean what you did is really my pressure, thanks.... thanks Amardeep. 2hafeni 

Java Beginners

Thanks - Java Beginners
Thanks  Hi, Yur msg box coding is good Thanks  Hi Thanks & Regards 

Java Beginners

Thanks - Java Beginners
Thanks  Hi, thanks This is good ok this is write code but i... either same page or other page. once again thanks    hai... the problem... state it correctly.... thanks and regards prashu 

Java Beginners

Thanks - Java Beginners
Thanks  Thanks Deepak Thankyou so much this is good web application but i m clicking insert button then addform.jsp page is not open plz suggest me   hai friend I think u gave the url is not currect. Check 

Java Beginners

Thanks - Java Beginners
Thanks  Hi, Thanks ur sending url is correct..And fullfill requirement.. I want this.. I have two master table and form vendor... and send me... Thanks once again...for sending scjp link 

Swing AWT

code - Swing AWT
code  i want example problem for menubar in swings  Hi Friend, Please visit the following links: http://www.roseindia.net/java/example/java/swing/SwingMenu.shtml http://www.roseindia.net/java/example/java/swing 

Applet Questions

Swing - Applet
information on swing visit to : http://www.roseindia.net/java/example/java/swing/ Thanks...Swing  Hello, I am creating a swing gui applet, which is trying 

Java Beginners

thanks - Java Beginners
 

Java Beginners

java swing - Java Beginners
java swing  utlility of super.paintComponent(Graphics g) in java? what does it do actually i.e. which class it is extending or method overriding? Please clarify this with example 

Swing AWT

java - Swing AWT
Java Implementing Swing with Servlet  How can i implement the swing with servlet in Java? Can anyone give an Example??   Implementing Swing with Servlet Example and source Code Servlet SwingToServlet 

Java Beginners

StringReverse Example - Java Beginners
:" + strOriginal); } } Thanks 

Java Beginners

java swing
java swing  how to connect database with in grid view in java swing   Hi Friend, Please visit the following link: Grid view in java swing Thanks 

Swing AWT

Look and Feel - Swing AWT
: http://www.roseindia.net/java/example/java/swing/GettingAndSettingLAF.shtml http://www.roseindia.net/java/example/java/swing/DefaultLookAndFeel.shtml Hope...Look and Feel  i m using netbeans for creating a swing GUI 

Swing AWT

Program for Calculator - Swing AWT
Friend, Please visit the following link: http://www.roseindia.net/java/example/java/swing/calculator-in-swing.shtml Hope that it will be helpful for you. Thanks 

Java Beginners

Java FTP file upload example
Programming in Java tutorials with example code. Thanks...Java FTP file upload example  Where I can find Java FTP file upload example? What is the link of the FTP examples on your website? Thanks   

Swing AWT

swings - Swing AWT
;Hi Friend, Please visit the following link: http://www.roseindia.net/java/example/java/swing/ Here you will get lot of swing applications that will illustrates you clearly. Thanks 

Swing AWT

java swing - Swing AWT
java swing  how i can insert multiple cive me exampleolumn and row in one JList in swing?plz g  Hi Friend, Please clarify your question. Thanks 

Swing AWT

SWINGS - Swing AWT
://www.roseindia.net/java/example/java/awt/ http://www.roseindia.net/java/example/java/swing/ Thanks...SWINGS  Thanks for your fast reply, But I dont want to receive 

Java Beginners

How to Hide Button using Java Swing
or provide online example reference. Regards,   hi, In java Programming application how to hide the buttons using Java Swing. Please Visit this below reference link http://www.roseindia.net/tutorial/java/swing 

Java Beginners

Java swing - Java Beginners
Java swing  Hi, I want to copy the file from one directory to another directory,the same time i want to get the particular copying filename will be displayed in the page and progress bar also. Example, I have 10 files 

Blog

Sitemap Java Swing Tutorial
-to-One Relationship | JPA-QL Queries Java Swing Tutorial Section Java Swing Introduction | Java 2D API | Data Transfer in Java Swing | Internationalization in Java Swing | Localization | What is java swing 

JDBC Questions

Example
Example  JDBC in Servlet examples.   Hi Friend, Please visit the following link: Servlet Tutorials Here you will get lot of examples including jdbc servlet examples. Thanks 

Ajax Questions

java persistence example
java persistence example  java persistence example 

Java Beginners

Java Hello World code example
"); } } Thanks Deepak Kumar  Hi, Learn Java...Java Hello World code example  Hi, Here is my code of Hello World program in Java: public class HelloWorld { public static void main 

Swing AWT

java swing - Swing AWT
java swing   how i can insert in JFrame in swing?  Hi Friend, Try the following code: import java.awt.*; import javax.swing....){ FormDemo ff=new FormDemo(); } } Thanks 

Swing AWT

java - Swing AWT
java  how to use JTray in java give the answer with demonstration or example please 

Java-Tutorials

Java JdbcRowSet Example
Java JdbcRowSet Example In this section we will see an example of JdbcRowSet... the ResultSet object. Example Here I am going to give a simple example which demonstrates how JdbcRowSet can be used. In this example I have created a class where I 

Java Beginners

Example of appending to a String
Example of appending to a String  Hi, Provide me the example code of appending to a Java program. Thanks   Hi, Check the tutorial: How To Append String In Java? Thanks 

Swing AWT

Java - Swing AWT
. http://www.roseindia.net/java/example/java/swing... or paint from my swing program?  Hi friend, import java.awt....("Paint example frame") ; getContentPane().add(new JPaintPanel 

Java-Tutorials

Swing In Java
. This example will demonstrate you about how to use the Swing components in Java...Swing In Java In this tutorial we will read about the various aspects of Swing... example etc. What Is Swing ? Swing is a part of JFC also known as Oracle's 

Java Beginners

Java Client Application example
Java Client Application example  Java Client Application example 

Swing AWT

query - Swing AWT
java swing awt thread query  Hi, I am just looking for a simple example of Java Swing 

Java Beginners

Thanks for fast reply - Java Beginners
Thanks for fast reply  Thanks for response I am already use html for data grid but i m noot understood how to connect to the data base, and how to fetch data from table in the data grid I am using mysql database package 

Hibernate Questions

Hibernate Criteria And Or Example
Hibernate Criteria And Or Example  Hibernate Criteria And Or Example I want example of Hibernate Criteria And Or in Java Thanks   Example of Hibernate Criteria And Or Criteria Check the tutorial Hibernate Criteria 

Core Java

Example of HashSet class in java
Example of HashSet class in java. In this part of tutorial, we... unique. You can not store duplicate value. Java hashset example. How.... Example of Hashset iterator method in java. Example of Hashset size() method 

Java Beginners

java swing (jtable)
java swing (jtable)  hii..how to get values of a particular record in jtable from ms access database using java swing in netbeans..?? please help..its urgent..   Here is an example that retrieves the particular record 

Java Beginners

java swing problem - Java Beginners
java swing problem  i doesn't know about the panel in swings here i had created one frame then created a panel and i added that to my frame but which... CreatePanel () { super("Example Class"); setBounds(100,100,200,200 

Core Java

Example of HashMap class in java
Example of HashMap class in java. The HashMap is a class in java collection framwork. It stores values in the form of key/value pair. It is not synchronized 

Swing AWT

slider - Swing AWT
://www.roseindia.net/java/example/java/swing/CreatSlider.shtml Thanks... Example"); Container content = frame.getContentPane(); JSlider slider 

Hibernate Questions

Hibernate Criteria With Collections Example
Criteria With Collections Example. Thanks   Example program of using Hibernate Criteria With Collections in your Java project. Check the tutorial... and examples of Hibernate Framework. Thanks 

Java Beginners

MVC architecture example - Java Beginners
MVC architecture example  hi.. I would like to ask the example... u give me some example of login authentication using JSP+Servlet+Javabeans...") 2.Then create a servlet page name like login.java 3.Then create another java 

Hibernate Questions

Dialect in Hibernate Example
Dialect in Hibernate Example   I want example of Dialect in Hibernate in Java. It will be very helpful for me if you share some tutorials. Thanks   List of Dialect in Hibernate ORM framework. Check the tutorial 

Java3D Questions

SWING
SWING  A JAVA CODE OF MOVING TRAIN IN SWING 

Core Java

Java Swing
at: http:/www.roseindia.net/java/example/java/swing/swing.shtml... Java Swing       Swing works as a widget toolkit for Java and is a part of JFC and are replacement 

Swing AWT

scrolling a drawing..... - Swing AWT
information. http://www.roseindia.net/java/example/java/swing/use-canvas-with-scrollpane.shtml Thanks 

Programming Tutorials

Java Swing Open Browser
Java Swing Open Browser Java provides different methods to develop useful applications. In this section, you will learn how to create an example that will open the specified url on the browser using java swing. This example will really 

Swing AWT

java swing - Swing AWT
java swing  how to save data in sql 2005 while insert in textfield  Hi Friend, Try the following code: import java.sql.*; import...(Exception ex){ System.out.println(ex); } } } } } Thanks 

Hibernate Questions

Associations and Joins Example in Hibernate
Associations and Joins Example in Hibernate  I am new to Hibernate programming and looking for good example of Associations and Joins in Java. Tell me the best place to Learn Hibernate. Thanks   You can find many 

Hibernate Questions

Hibernate Criteria Transformer Example
Hibernate Criteria Transformer Example  I want example of Hibernate Criteria Transformer to use in my Java project. share the good link. Thanks   Here I am giving you the link of Hibernate Criteria Transforme example 

Hibernate Questions

Hibernate Criteria Wildcard Example
want example of Hibernate Criteria Wildcard which is easy to understand. Thanks   Example tutorial in Hibernate for getting the data through...Hibernate Criteria Wildcard Example  Hi, How to write Java program 

Hibernate Questions

Hibernate Criteria Query Example
Criteria Query Examples in Java program? Share me the easy to learn example code. Thanks   Hi, Hibernate Criteria Query is used to selectively find the entities from the persistence store. Check the example Criteria Query Examples 

Hibernate Questions

Hibernate Detached Criteria Example
Criteria in Java program? What is the use of Hibernate Detached Criteria? Explain me with the help of example code. Thanks   The detached Criteria is useful when Hibernate session is not available. Check the example of Hibernate 

Swing AWT

hi - Swing AWT
information, visit the following link: http://www.roseindia.net/java/example/java/swing/ Thanks 

EJB Questions

EJB Example - EJB
with small example. Thanks sravanth  Hi Friend, Please visit...EJB Example  Hi, My Question is about enterprise java beans... that it will be helpful for you. Thanks 

Struts Questions

Struts Example - Struts
example in struts framework with sample code , hw to add and delete insert and update data into database by using sql, nw i am learning java struts u can help me above mention Thanks & Regards Dendi Email address : dendi46@yahoo.com 

Java Beginners

Java Swing - Java Beginners
Java Swing  Hi, I'm a java programmer, developed few java swing projects.. i want to make that swing jar packages to windows installer to .msi or .exe is that possible? after converting is it necessary that java should 

Swing AWT

Line Drawing - Swing AWT
) { System.out.println("Line draw example using java Swing"); JFrame frame = new... using java Swing import javax.swing.*; import java.awt.Color; import...Line Drawing  How to Draw Line using Java Swings in Graph chart 

Java Beginners

java program example - Java Beginners
java program example  can we create java program without static and main?can u plzz explain with an example 

Java Beginners

what is the example of wifi in java
what is the example of wifi in java  i want wi fi programs codings 

Java Beginners

Need an example of basic code.
Need an example of basic code.   Im working on an art project that I... simple so I was hoping java would look more impressive. So I just need a visual of the building blocks of my idea so if someone could provide an example I would 

Java Beginners

Need an example of basic code.
Need an example of basic code.   Im working on an art project that I... simple so I was hoping java would look more impressive. So I just need a visual of the building blocks of my idea so if someone could provide an example I would 

Java Beginners

Need an example of basic code.
Need an example of basic code.   Im working on an art project that I... simple so I was hoping java would look more impressive. So I just need a visual of the building blocks of my idea so if someone could provide an example I would 

Swing AWT

AWT-swings tutorial - Swing AWT
://www.roseindia.net/java/example/java/swing/ http://www.roseindia.net/java/example/java/applet/ ----------------------------------------- Thanks 

Programming Tutorials

Java Slider Example,Java JSlider,Slider Component in Java Swing,JSlider Source Code Java
JSlider Component of Java Swing In this section, you will learn how to create a JSlider component of Java Swing. A Slider is the tool of swing through...: JSlider: This is the class which creates the slider for the swing application 

Swing AWT

DrawingCircle - Swing AWT
: http://www.roseindia.net/java/example/java/swing/ Thanks 

Java Beginners

java string comparison example
java string comparison example  how to use equals method in String... strings are not same. Description:-Here is an example of comparing two strings using equals() method. In the above example, we have declared two string 

Advertisements Advertisements
 

 

 

DMCA.com