I have created one form for holiday, in which user entering date and description of the holiday. So I want to display this data in JTable at runtime. I have getting values of date and description perfectly.
String start= single_date.getDate().toString();
String desc_text=description_text.getText();
Now help me to display in JTable. I am using netbeans, so I am having JTable in my JForm.
If you want to use the
Default constructor of JTableto do it..then try this..It takes 2-Dimension Object array, and 1-Dimension String array
See this link for a working example:
http://java2s.com/Code/Java/Swing-JFC/JTableclassusingdefaulttablemodelsandaconvenience.htm