473,513 Members | 2,441 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How checkbox can be creted in table.

151 New Member
I am trying to create a table with three columns.
first two columns will be having text values while last column has checkbox. How it can implemented? Any example doing the same will really help me.


Thanks in advance.
Dec 23 '09 #1
3 1709
chaarmann
785 Recognized Expert Contributor
Use a two-dimensional array of class Object.

Tip: instead of accessing the elements directly, wrap around a class with setter and getter methods.
Dec 23 '09 #2
Man4ish
151 New Member
I am beginner in this field. I am C++ programmer moving into java. Working on table with check box as last column. How can i do it?
Dec 23 '09 #3
intriken
6 New Member
Expand|Select|Wrap|Line Numbers
  1.  
  2. TableColumn checkboxcol = Jtable.getColumnModel().getColumn(x)
  3. checkboxcol..setCellEditor(new CheckboxTableCellEditor());
  4. checkboxcol.setCellRenderer(new CheckboxTableCellRenderer ());
  5.  
  6. public class CheckboxTableCellRenderer extends JCheckBox implements TableCellRenderer {
  7. }
  8.  
  9. public class CheckboxTableCellEditor extends DefaultCellEditor {
  10. public CheckboxTableCellEditor () {
  11.    super(new JCheckBox());
  12. }
  13.  

something like that is what you want to do but with everythign implemented and correctly
Dec 23 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
2113
by: claudel | last post by:
Hi I have a newb PHP/Javascript question regarding checkbox processing I'm not sure which area it falls into so I crossposted to comp.lang.php and comp.lang.javascript. I'm trying to...
4
4611
by: Jack | last post by:
Hi, I have a checkbox the value which goes to a database via a asp page that builds the sql string. In the front end asp page, the checkbox code is written as follows: <i><input...
4
1669
by: Stefan Mueller | last post by:
To following code/script shows me the row number of the checkbox I've just clicked: <form name = "my_form" action = "" method = "post" accept-charset = "iso-8859-1"> <table name = "my_table"...
0
2783
by: Keith | last post by:
I have a repeater control that contains a HeaderTemplate and an ItemTemplate. Each item contains a checkbox with an ID of chkReconciled, and the header contains a single checkbox with an ID of...
0
2253
by: Keith | last post by:
I have a repeater control that contains a HeaderTemplate and an ItemTemplate. Each item contains a checkbox with an ID of chkReconciled, and the header contains a single checkbox with an ID of...
2
13133
by: nitindutt2005 | last post by:
Hi I have a html file as below. ==================================================================== <html> <head> <td style="background-color:rgb(170, 157, 244);"> <table border="0"...
0
4079
by: cyberdawg999 | last post by:
Greetings all in ASP land I have overcome one obstacle that took me 2 weeks to overcome and I did it!!!!! I am so elated!! thank you to all who invested their time and energy towards helping me...
0
3091
by: TechnoAtif | last post by:
<?php include "dbconnect.php"; include "commonFunc.php"; ?> <!----------------------------------> <table width="80%" border="1" cellpadding="2" cellspacing="0"> <tr > <td...
0
1695
by: remya1000 | last post by:
I have a field called Departments in my database. and I have 3 monitors. So when Page_Load, I need to check number of departments I have in database. And depends upon that number of departments I...
0
7259
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7158
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7380
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7535
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5683
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3232
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3221
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.