JTable with DefaultTableModel not showing?

I hope this is SSCE...
I'm using a defaultTableModel, but I cannot get the Table to show.
When I just simply put the vectors straight into the table, without using the DefaultTableModel it worked.
This is the code I have now, the table doesn't show at all?
I actually couldn't get this example to compile, as it only contains snippets of the code. The real code compiles and runs, but the table just doesn't show. I guess it's all part of the same problem.
If someone could help me with where I've gone wrong in the usage of the DefaultTableModel, it would be greatly appreciated.
import java.util.Vector;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.TableModel;
import javax.swing.*;
import javax.swing.table.DefaultTableModel;
import javax.swing.event.*;
public class FutureTable extends JTable implements TableModelListener {
     Vector colnames = new Vector();
     Vector inne = new Vector();
     TableModel model;
     JTable table = new JTable();
     public FutureTable(){
          //vector colnames
          colnames.addElement("Date");
          //vector inne
          inne.addElement("example")
          //Adds inne and colnames to the TableModel model
          model = new DefaultTableModel(inne, colnames);
          //sets Table to TableModel model
          table.setModel(model);
          //adds a listener to the table
          table.getModel().addTableModelListener(this);
import javax.swing.*;
import java.awt.*;
import java.util.Vector;
public class FutureTableHolder extends JPanel {
     Vector inne = new Vector();     
     JScrollPane scrollPane;     
     FutureTable theTable = new FutureTable();
     public FutureTableHolder() {          
          //Sets the layout to gridlayout so that the table will fill the panel.
          setLayout(new GridLayout(1,0));
          scrollPane= new JScrollPane(theTable);//ScrollPane
          add(scrollPane);
     }//Ends FutureTableHolder()     
     

When I just simply put the vectors straight into the table, without using the DefaultTableModel it worked. Well, the code is the same.
You can use:
JTable table = new JTable(data, columnNames);or
DefaultTableModel model = new DefaultTableModel(data, columnNames);
JTable table = new JTable( model );So you obviously have a problem with your code and you are not building the Vectors the same way. Since you did not post a SSCCE, we can't help (Although as noted above your data Vector is empty so there is no data to display).

Similar Messages

  • HT3180 Anyone having trouble with Netflix not showing up in the internet menu?  I am trying to do a reset, but it says it can't download latest updates try again later.

    Anyone having trouble with Netflix not showing up on the Internet Menu?  I have tried to do a reset and then restore, but it says that "the latest update download cannot be done at this time, try again later"

    If your problem persists get yourself a micro USB cable (sold separately), you can restore your Apple TV from iTunes:
    Remove ALL cables from Apple TV. (if you don't you will not see Apple TV in the iTunes Source list)
    Connect the micro USB cable to the Apple TV and to your computer.
    Open iTunes.
    Select your Apple TV in the Source list, and then click Restore.

  • Problems with page not showing up in Internet Explorer

    I uploaded my page. All was fine. Looked good in all
    browsers.
    home.gci.net/~larry-and-jackie/index.htm
    Now all of a sudden my index.htm page (also have default.htm
    page) shows up as a black screen only no pictures. No words.
    All of the sub pages show up fine if you add that to the
    address. Just the Index. is not showing up in Internet Explorer.
    Looks good in Firefox, Netscape and Safari.
    example home.gci.net/~larry-and-jackie/index3.htm
    Anybody have any suggestions?
    J Whedbee

    I'm seeing the entry page at:
    http://home.gci.net/~larry-and-jackie/
    with no problems.
    I'm also seeing
    http://home.gci.net/~larry-and-jackie/index.htm
    with no
    problems... pics, black background.
    http://home.gci.net/~larry-and-jackie/default.htm
    is just the same as
    index.htm
    http://home.gci.net/~larry-and-jackie/Index.htm
    (note the capital "I" )
    can't be seen .... no such file.
    Not sure why you would have an index.htm and a default.htm
    both really
    aren't needed.
    Have you tried clearing your browser cache?
    Nadia
    Adobe® Community Expert : Dreamweaver
    Tutorials |SEO |Templates
    http://www.DreamweaverResources.com
    http://www.perrelink.com.au
    CSS Tutorials for Dreamweaver
    http://www.adobe.com/devnet/dreamweaver/css.html
    "J L Whedbee" <[email protected]> wrote in
    message
    news:enccnu$n4t$[email protected]..
    >I uploaded my page. All was fine. Looked good in all
    browsers.
    >
    > home.gci.net/~larry-and-jackie/index.htm
    >
    > Now all of a sudden my index.htm page (also have
    default.htm page) shows
    > up as
    > a black screen only no pictures. No words.
    >
    > All of the sub pages show up fine if you add that to the
    address. Just the
    > Index. is not showing up in Internet Explorer.
    > Looks good in Firefox, Netscape and Safari.
    >
    > example home.gci.net/~larry-and-jackie/index3.htm
    >
    > Anybody have any suggestions?
    >
    > J Whedbee
    >
    >
    >

  • Groups created with dscl not showing in WGM?

    When creating a group "testGroup1" via dscl as follows ...
          Dscl -udiradmin /LDAPv3/mac-mini.local -create /Groups/testGroup1
    The group shows up when running ...
          Dscl -udiradmin /LDAPv3/mac-mini.local -list /Groups
    However, in Workgroup Manager the new created group"testGroup1" does not exist.
    Is there a way to determine where exactly the newly created Group is located?
    I did notice that the Workgroup Manager directory location is /LDAPv3/127.0.0.1.
    Does the 127.0.0.1 have something to do with it?
    Also, if I try to run the following ...
          Dscl -udiradmin /LDAPv3/127.0.0.1 -list /Groups
    I get an error saying "Data source(/LDAPv3/127.0.0.1) is not valid.
    I know it's there because it shows when I run a different tool called Ldapmanager.
    But for some reason it's not showing in Workgroup Manager.
    I was wondering if there is some attribute (or something like that) that must be set when creating the group before it will show in Workgroup Manager.
    Or maybe the server needs to be rebooted before they show? I wouldn't think that would be necessary, unless the users are being loaded when Workgroup Manager loads.
    Any help would be greatly appreciated.
    Thanks,
    Zeek

    Hi David
    There is a configuration that needs to setup to turn on outbound delivery document number update in MD04.
    This means if there is an STO in MD04 which is converted into outbound delivery, MD04 should now show outbound delivery number instead of an STO
    Follow this path and set up the document type of your outbound delivery in it
    Logistics execution -> Shipping -> Basic SHipping Functions -> Availability Check and transfer of requirements -> transfer of requirements -> Determination of Requirement Types using transaction

  • Acrobat plugin Build with SDK6 not Showing in Acrobat X and XI

    I'm working on an old Plugin build for Acrobat (not reader) using SDK v6.
    This plugin worked fine, upto Acobat 9. (it is only used in Windows)
    Now some users tell me it is not showing in Acrobat X.
    So I installed a trial verison of Acrobat XI.
    After reading some threads, I removed all the references to ADM.
    Recompiled it (VisualStudio 2010), and put the debug version in the PLUG-INS folder of Acrobat
    But there in no Menu added...
    In the General System Information, it is listed under Installed Plug-ins.
    But when running in VisualStudio, none of the callbacks is hit. (this worked fine when I was using Acrobat9)
    Some of my users are using the plugin in Acrobat7 so I prefer still using SDK6.
    Are there any other things that could be incompatible.
    What is the first Callback that Acrobat uses to talk to the Plugin.
    Can Acrobat give me any info on what is wrong with my Plugin.
    Johan

    If the plug-in is not even loaded, chances are that something goes wrong
    when the OS tries to link the plug-in to dynamic libraries. Verify that you
    have all the libraries installed that are required to run the plug-in.
    Karl Heinz Kremer
    PDF Acrobatics Without a Net
    PDF Software Development, Training and More...
    [email protected]
    http://www.khkonsulting.com

  • Issues with purchases not showing up in Purchased Playlist.

    Over the past week or so i have have noticed that my purchases are not showing up in my Purchased playlist on my iOS devices. They are syncing across devices but only being put under "Songs." I know i can manually add them to my Purchased playlist but that is such a pain. Anyone else having this issue?
    I am currently working on restoring my iPhone 5S to see if this helps but again this is a huge pain.

    Do you have automatic downloads turned on?  I think it's under iTunes menu >> preferences >> store.  Maybe turn on showing purchases in the cloud showing too.
    Could also click iTunes Store >> purchases (under quick links) >> music.  Does the missing music show there with cloud and down arrow?

  • Email sent with attachments not showing in sent folder

    I have recently found that emails I send with an attachment do not show up in my sent folder. They are arriving at recipient but I do not then have a record of the email sent.  This is really very annoying and I can see a few other poplin online forums are having the same problem.  However nobody seems to have come up with a solution.  It appears I have to cc myself in to the mail and then move it to my sent folder when it arrives. I can't keep doing this.  Other emails without attachments are showing in the sent box.  Does anyone have any idea what I can do to fix this please.

    Didn't work for me... (rebuilding the mailbox)
    I cleaned the Sent mailbox and rebuilt the culprit mailbox and the general "Sent" mailbox.... sent a message.. it 'hung' in the Outgoing Message box for @ 20 seconds and it sounded as if it were sent and when checking the Sent mailbox for that account, it did not show.... I tested this again with another message addressed to myself and it sent as expected and showed in the Sent mailbox for the account... Did another test to a different recipient and the message sent as expected and showed in the Sent mailbox... The only corrollary that exists at this stage, is the recipient of the "disappearing" messages is that I email this particular recipient very regularly and at times with long threads... However, these last messages were completely different subjects and previous replies to this persons email sent as expected.... so this is a random occurrence.
    --prd54usa

  • Help with Datatip Not showing on 2 different charts at the same time

    What's up guys?  I am building a massive application and came across an issue. I was able to create a smaller flex application that recreate the problem. Basically its about the datatip. Let's say you have a Main application with tab navigation that calls 2 different modules:  Module A, and Module B. Module A has a piechart with datatip enabled. Module B has a linechart with datatip also enabled. For some reason the piechart datatip are showing while the linechart datatip are not showing on mouse over (only on click). Any idea what's going on or how to fix it so that both charts show their datatip on mouse over? -Thank you
    Here are the codes below:
    MAIN APPLICATION:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" paddingTop="20">
        <mx:VBox paddingTop="50" width="80%" height="100%" paddingLeft="50">       
                <mx:TabNavigator width="80%" height="100%" >           
                    <mx:VBox label="Module A" >
                        <mx:ModuleLoader url="tester2.swf" width="100%" height="100%"/>
                    </mx:VBox>
                    <mx:VBox label="Module B" mouseChildren="true" >
                        <mx:ModuleLoader url="tester.swf" width="100%" height="100%" />
                    </mx:VBox>                   
                </mx:TabNavigator>   
        </mx:VBox>   
    </mx:Application>
    Module A:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"   xmlns:local="assets.*"  initialize="_onInitialize( event )">
        <mx:Script>
            <![CDATA[
                import mx.controls.Alert;
                import mx.events.FlexEvent;
                import mx.collections.ArrayCollection;
                [Bindable] private var _chartDP:ArrayCollection;
                private function mouser(event:MouseEvent):void
                    Alert.show("RPG");
                private function  _onInitialize( event:FlexEvent ):void
                    // set up our chart data
                    _chartDP = new ArrayCollection();
                    _chartDP.addItem( { quarter:1, shooter:1000, racing:400, rpg:550 } );
                    _chartDP.addItem( { quarter:2, shooter:875, racing:230, rpg:600 } );
                    _chartDP.addItem( { quarter:3, shooter:920, racing:310, rpg:512 } );
                    _chartDP.addItem( { quarter:4, shooter:750, racing:130, rpg:489 } );
            ]]>
        </mx:Script>
        <!-- defining the chart -->
        <mx:LineChart id="gameSales_chrt"   
           dataProvider="{ _chartDP }" showDataTips="true"  y="45" x="83" >
            <!-- Setting our Axis/Axes -->
            <mx:horizontalAxis>
                <mx:CategoryAxis categoryField="quarter" title="Sales Quarter" />
            </mx:horizontalAxis>   
            <!-- Set up our data series -->   
            <mx:series >
                <mx:LineSeries yField="shooter" displayName="First Person Shooter" form="segment" />
                <mx:LineSeries yField="racing" displayName="Racing Simulation" form="segment" />
                <mx:LineSeries yField="rpg" displayName="Role Playing Game" form="segment"  />
            </mx:series>
        </mx:LineChart>
        <!-- Set up the legend for the chart -->
        <mx:Legend dataProvider="{ gameSales_chrt }" direction="horizontal"  x="121" y="10"/>
    </mx:Module>
    Module B:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"  initialize="_onInitialize( event )">
        <mx:Script>
            <![CDATA[
                import mx.events.FlexEvent;
                import mx.collections.ArrayCollection;
                [Bindable] private var _chartDP:ArrayCollection;
                private function  _onInitialize( event:FlexEvent ):void
                    // set up our chart data
                    _chartDP = new ArrayCollection();
                    _chartDP.addItem( { genre:"Shooter", quarter1:1000, quarter2:932,  quarter3:845, quarter4:663 } );
                    _chartDP.addItem( { genre:"Racing",  quarter1:565,  quarter2:875,  quarter3:732, quarter4:432 } );
                    _chartDP.addItem( { genre:"RPG",     quarter1:432,  quarter2:743,  quarter3:531, quarter4:289 } );
            ]]>
        </mx:Script>
        <!-- defining the chart -->
        <mx:PieChart id="gameSales_chrt"   
           dataProvider="{ _chartDP }"
           showDataTips="true" y="60" x="10">
            <!-- Set up our data series -->   
            <mx:series>
                <mx:PieSeries
                    nameField="genre"
                    field="quarter2"
                    labelPosition="insideWithCallout" />
            </mx:series>
        </mx:PieChart>
        <!-- Set up the legend for the chart -->
        <mx:Legend dataProvider="{ gameSales_chrt }" direction="horizontal"  y="10" x="24"/>
    </mx:Module>

    Well upon using the debug function and having a stop at the show datatip static function, i came across this error
    TypeError: Error #1034: Type Coercion failed: cannot convert mx.managers::DragManagerImpl@195b9b21 to mx.managers.IDragManager.
    at mx.managers::DragManager$/get impl()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\DragManager.as:15 2]
    at mx.managers::DragManager$/get isDragging()[C:\autobuild\3.2.0\frameworks\projects\framework\src\mx\managers\DragManager .as:187]
    at mx.charts.chartClasses::ChartBase/processRollEvents()[C:\work\flex\dmv_automation\project s\datavisualisation\src\mx\charts\chartClasses\ChartBase.as:2310]
    at mx.charts.chartClasses::ChartBase/mouseMoveHandler()[C:\work\flex\dmv_automation\projects \datavisualisation\src\mx\charts\chartClasses\ChartBase.as:4308]

  • Numbered bullet character style with underline not showing

    Hi,
    I have a paragraph style for numbered bullets where I've used a character style for the numbered bullet.
    The character style has an underline applied so the effect looks like white text on a blue box, the blue box being created by the underline.
    The 'Paper' coloured number is showing, I can see it by placing a coloured box behind the text box to test.
    But the blue underline is not showing. When I apply the character style on other text it works fine.
    Could this be a bug?
    InDesign CC, Mac OS X 10.8.4

    Thanks for responding.
    "Paper" is the colour I am using for the character colour and then using another named colour for the underline.
    But it is happening the same as you suggest in your screengrab.
    In my screengrab below I have put in a black box to show that there is no underline appearing!
    And my paragraph style with that character style applied:
    So how do we submit this as a bug? And why hasn't it been fixed before now?!!!
    thanks.

  • Continued Problem (several weeks)with iArtwork not showing up

    I just don't get it, my artwork is still not showing up. The generic image is appearing for my podcast. My images do appear when the podcast plays, but the generic image is still appearing on my podcast page. I know the feed is correct. itunes continues to update when I send new images but my main artwork is still the itune generic- any suggestions. I've had my feed validated several times.
    getfitpod
    Dell   Windows 2000  

    See the forum announcement regarding problems with the iTunes podcast image.
    It's broke and Apple is working on fixing it.
    Look through some of the other threads regarding this problem for some helpful tips to ensure that your artwork will show up whenever Apple finally fixes it.
    Erik

  • HT201317 Photos I take with iPhone not showing on "my photostream" album.

    The photos I take with my iPhone 4 are not showing on "my photostream" album on iPhone. They are also not being sent to Apperture.
    iPhone is updated (ios 6)
    Mac is updated.
    Both devices connected to same wi-fi (steady and fast).
    Both devices connected with same apple-id.
    Photostream is turned on in both devices.
    Tried to reboot both devices.
    Tried to turn of and on again Photostream in both devices.
    Images still don't appear on "my photostream" on iPhone and Apperture still don't get them.
    Please help.

    Photos I import via Mac to Apperture are being uploaded to Photostream and appear on "my photostream" album on iPhone.

  • Problem with Mail not showing new messages

    Since 2 weeks, my Mail does not show any of my 'hotmail' messages receive. The connection diagnosis said there are no problem with the account and server. It seems to download incoming mail (which also show in hotmail) but Mail does not show any new messages.

    Back up all data.
    Select the problem mailbox in the mailbox list, then select
    Mailbox ▹ Rebuild
    from the menu bar.

  • JTable that does not show unless physically click into center JPanel.

    I update a JTable with a new resultSet and I cannot see the table unless I physically click into the centerPanel of the JFrame where the Jtable is held. Once I do that the data is updated - but I need it to show without any action. I have never encountered this problem before, any advice would be greatly appreciated. Thank you in advance for your advice and time.

    use table.setModel(...) and it will repaint itself.

  • Gmail contacts & calender synced with IP5 not showing in icloud

    I synced my iPhone 5 with my gmail contacts and calender.  They show on the phone. I have icloud set up but they are not showing there.  Gmail groups are not showing up either.  What do I need to do?

    Then let me ask you this.  I use these devices, iMac, and new to iPhone5 for personal use.  My email is from a pop server where we have our internet access.  I surf on the phone and primarily listen to books on audible, sometimes sending emails.  It sounds as if I already have gmail contacts & calender set to sync with the phone (not the email portion of gmail) that I rellly don't need icloud.  Does that sound right to you?  If this is the case, is there no way then to set up contact groups from gmail to the phone, except doing so manually?  As I write this though, is it worth it to get everything set up on icloud vs staying with gmail based info?

  • Mavericks 10.9.1-Problem with finder not showing peripheral hardware

    After upgrading to Mavericks (10.9.1) my Finder doesn't show new hardware in Devices. For example, Finder not showing iPod when i plug into the keyboard's usb. i have other examples  of the same problem, such as trying to find a hard drive detached from an old computer. anyone know if i can configure Finder to show all peripheral (hardware) devices? maybe i need to plug the peripherals into back of the iMac rather thatn into my keyboard usb (which i have not tried.) Thanks in advance.
    Charlie

    I had a similar issue as you did -- for a few weeks now I've been suffering through agonizingly slow Contacts performance.
    The way I resolved it was:
    1) Quit Contacts
    2) Go to system preferences and go into iCloud, then uncheck contacts -- choosing to delete from mac.
    3) Go into system preferences and to Internet Accounts and again uncheck contacts under any of the accounts it's enabled on (gmail, yahoo, etc).
    4) Go to your user's library folder (easiest way is to open a finder window, hold down the option key on the keyboard and from the Go menu, select Library).
    5) Delete anything referring to Address book or com.apple.address book....   -- check these folders in particular:
         - Address Book
         - Application Support
         - Caches
         - Preferences
    6) Restart your computer
    7) Go back into System preferences and enable contacts from wherever you want (iCloud, etc.)
    8) If it's not quite enabling (appears to enable, but checkbox doesn't show), then do one more restart of the computer.
    9) Now open Contacts and allow it to sync

Maybe you are looking for