Home > Default > DefaultTableModel


November 30Hits:0
I have a table in which rows can be added and when I click ok in this dialog it will save the names in a different table separated by commas.But my problem is if the user adds in an empty row then a comma is displayed after I click ok.So how do I remove the comma depending on what is there in the first dialog....
Thanks in advance


Hey guys,
I got the catch.
I did a :
viewport = new JViewport();
After which the display seems fine. The problem is just with the viewport settings that I have used, that is the Table sizes etc.
I hope this will be useful for whoever is facing a similar situation.

Read other 2 answers


Related Articles

  • Exception with DefaultTableModelOctober 11

    Dear all, I want to instatiate this class and add to my JTable. However, I can't make an instance of this. If I extend AbstractTableModel my code is working fine but with DefaultTableModel I get the exception: "Exception caught in Scenegraph: null&qu

  • Hiding a column in jtable made from DefaultTableModel.October 11

    I have made my jtable from DefaultTableModel. I want to keep one column in the jtable as hidden storing some data containing neccessary information like the "path of the file" which need not be shown to the user. Please tell me how I can hide on

  • How Can i get the data From A Table that use DefaultTableModelOctober 11

    Hi and sorry for my bad english. The problem that i have is that i used this code to fill a table. Now i want when i select a row and click in a button , get the value of that row that i select so then i can update or delete that data in my dataBases

  • Getting the Data from a DefaultTableModelOctober 11

    Hey, I have a table that utilizes a defaultTableModel to store the information. What I want to do is get the information from that table model as a 2-dimensional array? Is this possible? I have googled for a while, and still can't find anything. At f

  • How can i add a table header using DefaultTableModel?October 11

    Im having problems finding examples of creating a table header using the DefaultTableModel. Can anyone point me in the right direction? so far i am able to create a table and add rows, but i need the first row to be the header with title and i am not

  • How to remove a row from a jtable with DefaultTableModelOctober 11

    Hi to all,] I want to remove a row from jtable. I am using DefaultTableModel. I have got some example but every example is given with AbstractTableModel Please help me... Thanks and RegardsI want to remove a row from jtable. I am using DefaultTableMo

  • Does edting a table cell update the defaulttablemodel??October 11

    hi I am a bit confused by the documentation I have read.. I just want to confirm wheither editing a cell in a JTable should update a value in the underlying model(a defaultTableModel in my case) only by declaring the the below.. <code> Object data[]

  • DefaultTableModel ProblemNovember 30

    Dear all, I am trying to build a JTable with the below class. If I extend AbstractTableModel my code is working fine but with DefaultTableModel I get the exception: "Exception caught in ...: null". Why do I get null exception in this code? I can

  • How to use TableSorter class with DefaultTableModelNovember 30

    Hi Friends Please tell me how to use TableSorter Class which is in the Java. Tutorials with DefaultTableModel. i saw in a thread there it was given that we have to pass the DefaultTableModel to the TableSorter Class. I tried to use like that. But i a

  • Selection color not working with table that has DefaultTableModelNovember 30

    hi folks, I noticed if a table has a AbstractTableModel, when you select a row, by default the highlight color is light blue. However, if a table has a DefaultTableModel, even if you invoke table.setSelectionBackgroun(color) and table.setSelectionFor

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.643 s.