Someone please help me!!!! out of my wits!!!!

Hi all,
i have the following two classes. one is a table model that in herits from DefaultTableModel. i have designed the table model to show the first row with blank values except for the run column which has a checkbox. when i call the method Add_New_Row from a button click, nothing happens. i want to add a new row to the table the same as the first. Can someone please help with this.
public class Table_Class extends JTable
CsgTableModel model = new CsgTableModel();
JTable table = new JTable(model);
JScrollPane pane = new JScrollPane(table);
public Table_Class()
table.setRowHeight(25);
public JScrollPane Return_Table()
return (pane);
public void Add_New_Row() // add a new object row to the mission table
((DefaultTableModel)(table.getModel())).addRow(new Object[] {null,"","","","",new Boolean(false),""});
public class CsgTableModel extends DefaultTableModel {
final String[] columnNames = {"Name","Object Trajectory",
"Type of Sensor","Signature","Sensor Trajectory",
"Run","Status of run"};
final Object[][] data = {{"", "","","","",new Boolean(false),""}};
public int getColumnCount() {
return columnNames.length;
public int getRowCount() {
     return 1;
public String getColumnName(int col) {
return columnNames[col];
public Object getValueAt(int row, int col) {
return data[row][col];
* JTable uses this method to determine the default renderer/
* editor for each cell. If we didn't implement this method,
* then the last column would contain text ("true"/"false"),
* rather than a check box.
public Class getColumnClass(int c) {
return getValueAt(0, c).getClass();
* Don't need to implement this method unless your table's
* editable.
public boolean isCellEditable(int row, int col) {
//Note that the data/cell address is constant,
//no matter where the cell appears onscreen.
if (col < 0) {
return false;
} else {
return true;
* Don't need to implement this method unless your table's
* data can change.
public void setValueAt(Object value, int row, int col) {
if (data[0][col] instanceof Integer
&& !(value instanceof Integer)) {
//With JFC/Swing 1.1 and JDK 1.2, we need to create
//an Integer from the value; otherwise, the column
//switches to contain Strings. Starting with v 1.3,
//the table automatically converts value to an Integer,
//so you only need the code in the 'else' part of this
//'if' block.
try {
data[row][col] = new Integer(value.toString());
fireTableCellUpdated(row, col);
} catch (NumberFormatException e) {
} else {
data[row][col] = value;
fireTableCellUpdated(row, col);
thanks for any help

use Vectors of vectors for holding your table data, since you won't be able to increase the size of your Object[][] array when you add a new row.
Implement your table model as follows -
public class CsgTableModel extends DefaultTableModel {
final String[] columnNames = {"Name","Object Trajectory",
"Type of Sensor","Signature","Sensor Trajectory",
"Run","Status of run"};
Vector data = new Vector();
public int getColumnCount() {
return columnNames.length;
public int getRowCount() {
return data.size();
public String getColumnName(int col) {
return columnNames[col];
public Object getValueAt(int row, int col) {
Vector rowData = (vector) data.get(row);
return rowData.get(col);
public void addRow(Vector rowdata) {          
int newRowIndex = getRowCount();
data.add(rowdata);               
fireTableRowsInserted(newRowIndex, newRowIndex);
public Class getColumnClass(int c) {
return getValueAt(0, c).getClass();
public boolean isCellEditable(int row, int col) {
if (col < 0) {
return false;
} else {
return true;
public void setValueAt(Object value, int row, int col) {
Vector tempData = (Vector) data.get(0);
if (tempData.get(col) instanceof Integer
&& !(value instanceof Integer)) {
Vector rowData = (Vector) data.get(row);
try {
rowData.removeElementAt(col);
rowData.add(col, new Integer(value.toString()));
fireTableCellUpdated(row, col);
} catch (NumberFormatException e) {
} else {
rowData.removeElementAt(col);
rowData.add(col, value);
fireTableCellUpdated(row, col);
your Add_New_Row() method should now look like this -
public void Add_New_Row() // add a new object row to the mission table {
Vector rowVector = new Vector();
rowVector.add("");
rowVector.add("");
rowVector.add("");
rowVector.add("");
rowVector.add("");
rowVector.add(new Boolean(false));
rowVector.add("");
model.addRow(rowVector);
table.updateUI();

Similar Messages

  • HT201177 My new MacBook Retina cannot play any videos on any browser. This includes the Apple videos. It keeps saying Missing Plug-In. I am not sure what I am supposed to do. Can someone please help me out?

    My new MacBook Retina cannot play any videos on any browser. This includes the Apple videos. It keeps saying Missing Plug-In. I am not sure what I am supposed to do. Can someone please help me out?

    My iPod mini, 4gb is hard to get serviced obviously because they dont make them anymore
    It is as simple to get it serviced as the day you purchased it.
    How is it hard to get it serviced?
    How long have you had your iPod?
    i get maybe 4-5 hours of battery life, maybe even 6 if im lucky
    That is not good but it's not "terrible".
    If you've had it less than a year, send it back to Apple to replace the battery.
    thought that i might buy an attachment type accesorie that i plug into the usb port on my ipod
    It's called a dock connector, not a USB port.
    i found a product in the online store, that i guess you place the ipod mini on, and it gives you up to 20 or so more hours of time but then it says that you have to have a firewire port or cable?
    What is it? The firewire port is on the computer, not the iPod.
    If the original battery is going bad, the first thing to do is get that sorted out.

  • My video recording sounds not working but other sounds are working fine, I've tried clearing the little mic thing near my earphone hole and had no success can someone please help me out?

    hhi guys
    my video recording sounds not working at all but it's working for other things such as music. I've tried to clear my sound thing near the earphone hole but had no success can someone please help me out?

    Had an Iphone 4 for about 3 months now. This happened to the first one I had and they ended up having to replace it at the apple store just a couple weeks ago 6/2. It happened again last night to my new one. This time i was able to correct it by going to itunes, backing up the phone to icloud, and then restoring the software. Mine did not work with voice memo, but did work with headphones plugged in, and would also work on speaker. I could hear callers but they couldn't hear me. I had purchased a new case (lifeproof case at $79.99) because it comes with plugs that cover the headphone jack, and the charging port, and is also waterproof. I heard that the root cause is due to lint, dirt, etc getting inside the headphone jack. Well, must be something else. It's a 10 days old phone, and has been in this overpriced case the whole time, and I have not used the headphones. I hope this doesn't keep happening.

  • Has anyone had problems with upgrading iPhoto. I am, it's stops at 5 0f 9 and will not finish!! Can someone please help me out?

    Has anyone had problems with upgrading iPhoto? I am, it stops at 5 of 9 and just stays there and won't finsih. Can someone please help me out?

    iphoto upgrading: Apple Support Communities
    iphoto upgrade hangs: Apple Support Communities

  • Hi, someone please help me out... am Nelson and got an issue with my apple Qmaster... I got OSX maverix and on my system preferences the Apple Qmaster dosent load but only gives an error, someone please help.

    hi, someone please help me out... am Nelson and got an issue with my apple Qmaster... I got OSX maverix and on my system preferences the Apple Qmaster dosent load but only gives an error, someone please help.

    the error is like "Could not load Apple Qmaster preference pane"
    if there is a way around it please help me coz I cannot render my video projects on Compressor anymore...

  • Hi, i was wounding if anyone would help me get information on the company regarding the acquisition of, beats by dre, could someone please help me out as i am doing a college report on this and need some good sources of information

    hi, i was wounding if anyone would help me get information on the company regarding the acquisition of, beats by dre, could someone please help me out as i am doing a college report on this and need some good sources of information

    Try a search with Google.
    Why should we do your homework for you?

  • TS3694 I am having problem with my iphone 3g update, its showing 1015 error. someone please help me out. Thanks

    I am having problem with my iphone 3g update, its showing 1015 error. someone please help me out. Thanks

    nomibutt wrote:
    ... its showing 1015 error.
    Unauthorized modification of iOS
    http://support.apple.com/kb/HT3743
    ERROR 1015...
    This Error Code is indicative of the Device being jailbroken / Hacked...
    Sorry... But...
    The discussion of Jailbroken Devices is against the Terms of Use of this Forum.
    You will need to look elsewhere.

  • HT201412 can someone please help me out of nowhere my iphone went fuzzy then completely turned off i have tried charging it and it still wont work and itunes wont pick it up and it wont start up nothing please help me

    can someone please help me as its not letting me turn it on. i have tried to start it up pressing both buttons connecting to itunes and its not working still., it wont even charge or show apple icon anymore,

    You may not get a response as you are shouting at everyone.
    All caps indicates shouting, is considered rude, and is difficult to read.
    Many will not read such posts.
    Try turning off you caps lock and asking again.

  • So i have 29 albums and my computer says it has 2.55gb on the itunes, and im planing on getting a iphone 5 that has 16gb or 32gb and idk which one to get? Can someone please help me out!!!!!!!!!!!

    So i have 29 albums and my computer says it has 2.55gb on the itunes, and im planing on getting a iphone 5 that has 16gb or 32gb and idk which one to get?  Idk but i just need to know how much storage  that can hold 2.55 gb of albums and rest of the apps and pic i gonna put on this iphone 5 im getting! please help!!!!! (16gb or 32gb?) If maybe can i get some tips about Storage!

    I certainly owuld not get the 16 Gb.  My old phone had 32 Gb and it was pretty much full.  I just depends on what you wan tto place on it in the way music, apps, videos etc

  • Can someone please help me out...N5300

    I'm having trouble connecting my Nokia 5300 to my PC...
    1. Can you use a USB cable that isn't the Nokia brand? (i seemed to have misplaced my nokia one)
    2. If above is yes, then why does my PC not seem to recognize when i connect my phone to my PC?
    Please help me!

    Are you attempting to use a debit card to pay for iTunes purchases?
    In many countries, that is not an option. You need to use a credit card or iTunes gift cards.
    ~Lyssa

  • Will someone please help me out?

    Hello, I am using Adobe Flash CS4 Professional, and a friend is going to help me edit the file, but he has Flash 8. Can someone that has Flash CS3 help me convert it to a Flash 8 file? CS4 Professional can't, so I need someone to. If you can, please reply to this forum and email me at
    [email protected]
    Thanks for the help guys.
    -BlankFuture (Burke)

    Hello, I am using Adobe Flash CS4 Professional, and a friend is going to help me edit the file, but he has Flash 8. Can someone that has Flash CS3 help me convert it to a Flash 8 file? CS4 Professional can't, so I need someone to. If you can, please reply to this forum and email me at
    [email protected]
    Thanks for the help guys.
    -BlankFuture (Burke)

  • Can someone please help me out with a task on Photoshop? I am willing to pay!

    Hi everyone,
    I'm looking for someone who is skilled in using Photoshop (or a similar program) to edit PDF documents.
    I don't want to post my entire document here, as it includes personal information, but you can download a sample of the document I need you to work on here:
    http://www.4shared.com/folder/Pc7enLBn/_online.html.
    Where there is a letter grade written (for example, DI), I would need that changed to something else (for example, HD, or in some cases - grade not available). I would need this done HIGHLY accurately, with absolutely no room for error.
    I do have my reasons for doing this, and I am happy to provide them to the person who would like to undertake the job.
    I am prepared to pay you a negotiable amount of money - potentially something around $50, or more, if need be. I can transfer the money through online banking.
    Additionally, I will need this job completed ASAP - approximately 24 hours from when I send you the main file.
    If you are interested, please email me at the email address I created for this job: [email protected], or provide your email address here for me to contact you. If you have any relevant qualifications or experience, please tell me.
    Many thanks, and I look forward to hearing from you soon!

    Your task is hardly a case for Photoshop: replacing text accurately in a scanned, not even
    straightened image.
    My recommendations:
    a) put a crossreference list on each page
       or
    b) straighten the scans and improve the contrast, both by Photoshop.
       Then apply a program which converts images of text into machine coded text
       by OCR - Optical Character Recognition , for instance Abbyy Finereader
       http://finereader.abbyy.de/professional/?adw=google_eu&gclid=CMirrcCMx7MCFZHRzAodlisAJg
       (I'm not related to the manufacturer of this software, I'm just a user).
       In coded text it's easy to replace isolated character groups as required.
    Best regards and good luck --Gernot Hoffmann

  • Can Someone please help me out????

    Ive recently been having problems with my iPod after it froze on me mid song...I reset it using the guidelines...
    unfortunately it wiped the whole thing-so now ive nothing on there at all (its gone back to how it was when i bought it!!)
    Since it erased its memory I have reinstalled itunes on my eMac with mac OS 10.1.1? and now the computer will not accept my iPod when its plugged into the USB....It reccognises there is a drive plugged in but refuses to read it....keeps saying unknown drive attatched this computer cannot read etc...
    I need to know what is going on and if anyone has any idea how to get the computer to reccognise my iPod again Im open to almost ANY suggestions!!
    Thankyou So much for any help!!!!
    Ben

    Audio problems have recently become the most difficult problem to help people with in this forum because there are SO MANY different audio options.
    These Knowledgebase article MAY be of help:
    Final Cut Express & Final Cut Pro: How to export a movie with chapter markers for iDVD at http://docs.info.apple.com/article.html?artnum=42973
    iDVD 6: No audio on finished DVD at http://docs.info.apple.com/article.html?artnum=303550
    Video and image formats that work with iDVD at http://docs.info.apple.com/article.html?path=iDVD/6.0/en/24.html
    One approach some people have reported success with when having audio problems is exporting the competed movie (audio track and all) to a miniDV camcorder tape. Then re-inport the movie into iMovie using the cancorder - add chapter markers - and send to iDVD.
    I wish we had an easy, sure fix for you.
    BTW, I recommend ALWAYS 'burning' to a disk image file first so you can verify the project plays correctly. Then use Apple's Disk Utility or Roxio's Toast Titanium 7 to burn the image to writable media at a low burn speed (4x or lower). This will save you from creating many 'coasters'.

  • Airplay icon not appearing on Macbook Air (mid 2011). Everything is updated, can someone please help me out??

    Hey, so I just bought an Apple TV specifically to mirror my Macbook Air screen to my TV.
    My Mac is mid 2011 so it whould be working, I'm wondering if there is a setting I have missed or something?
    All other functions are working except the Airplay icon is not showing on my toolbar??
    Anybody know how I can fix this??

    According to other discussion threads I need Mountain Lion? I'm on 10.7.5 is that Lion? My Mac says I have no new software updates though? So confused!

  • Can someone please help my iphone 4 is stuffed after ios 7.1 update?

    Hi everyone I have a friend who accidentally press on the new ios 7.1 update and now my iphone 4 is stuffed up.
    My list of problems are:
    Home button doesn't even work it use to work fine with ios 7.0.6
    The battery drains so easily
    It keeps telling me to trust the computer no matter how many times I press trust (can't connect to itunes because of this)
    It would screeen shot itself for no reason
    The powerbutton doesn't work sometimes
    My apps lag a lot or it gets stuck (have redownloaded all my apps but still it doesn't work)
    Could someone please help me out. I m so disappointed with apple now and I need a way to fix my phone. I don't have money to buy another one and I m out of warranty. If someone could suggest a way it would be much aprreciated.

    Lintastic wrote:
    If someone could suggest a way it would be much aprreciated.
    Connect to iTunes on the Computer you Usually Sync and Backup to and Restore as New
    See  >  http://support.apple.com/kb/HT1414
    Make sure you have the Current Version of iTunes Installed on your computer
    iTunes free download from www.itunes.com/download

  • I can not get my ipod touch/iphone 5s to sync to itunes i have tried everything i can think of reset ipod,redownload itunes check linking cable usb port ect... if anyone out there is or has gone through this please help me out thx

    can someone please help me out!!!!

    See
    iOS: Device not recognized in iTunes for Windows
    - I would start with
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    However, after your remove the Apple software components also remove the iCloud Control Panel via Windows Programs and Features app in the Window Control Panel. Then reinstall all the Apple software components
    - New cable and different USB port
    - Run this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Also see:
    Troubleshooting issues with iTunes for Windows updates
    - Try on another computer to help determine if computer or iPod problem

Maybe you are looking for

  • Snapshot alternatives?

    Snapshot hasn't been updated for a couple years (the 6.5 version comes with ZEN 7) and it always seems to crash w/ a memory error on large applications w/ a lot of registry entries. We are having to resort to 3rd-party packaging utilities (like the "

  • How to check File size of a Text file.

    How to check File size of a Text file. please explain me. I am new in LabVIEW. and dont have much idea on this...; Prashant Soni LabVIEW Engineer Solved! Go to Solution.

  • Create an event using abap class

    Hi, I’m trying to create an event by using an abap class. The purpose is to update po reqs using BAPI_REQUISITION_CHANGE upon saving a sales order.  The exit is called on saving a sales order MV45AFZZ. In  MV45AFZZ the method cl_swf_evt_event is call

  • DTP Set Overall Status to not turning to Green, it's remains yellow

    Hello, I'm extracting data from Attributes and loading into SQL data base using openhub destination. When request the Job, Request status remain Yellow but Technical status of the request is green, but set overall  status to green is in Grey colour.

  • Regions display name number of characters

    I would like to increase the number of characters currently available in the Region Display Name, currently I am limited to 40. How do I change the number of characters avaialble to me?