I am planning to create a table where everytime i add a row, a checkbox inside the table will also be created, will that be possible? And i am using window builder. If it is possible, can you give me some instructions how to do it? I did my research about it but none comes close to my question.
Thank you :)
wallet123
15
Junior Poster
Recommended Answers
Jump to Post
agree read Oracle tutorial for working code example
note (probably typos or fast hands by @JamesCherrill) JCheckBox haven't something with JComboBox, logics is quite/little bit different, for JCheckBox just Boolean value stored in XxxTableModel to represents JCheckBox as Renderer/Editor in JTables view
Jump to PostOK, "exactly the same" was a bit of an exaggeration, but the overall approach is the same.
Jump to PostOK. That code is going off in all kinds of wrong directions. I need you to go back and re-readthe link I gave earlier
This part of the tutorial
You need to create a …
Jump to PostI really don't know how to make this any clearer than the Java and training experts who wrote the tutorial. Your code doesn't even start to resemble the tutorial code I linked to. Did you read it? I honestly don't know to make it any clearer than that. Sorry.
Jump to PostOK, that's getting a lot closer. Main problem is that the getColumnClass method needs to be in the table model class, and takes an int as its parameter.
Here's an example that just illustrates the stuff you need (for the requirements that you have posted so far).
First, you need …
All 20 Replies
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
wallet123
15
Junior Poster
mKorbel
274
Veteran Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
wallet123
15
Junior Poster
wallet123
15
Junior Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
wallet123
15
Junior Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
mKorbel
274
Veteran Poster
wallet123
15
Junior Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
wallet123
15
Junior Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
wallet123
15
Junior Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
wallet123
15
Junior Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
wallet123
15
Junior Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.