Another problem with JTable

Hi,
I have encountered a problem with JTable, i am trying to display some 15 columns and their values , one of the columns value is null, then the JTable is not displaying its value from this column(which is with null value) onwards.
Can anybody assiss me in this matter.
Regards
khiz_eng

I don't know If I can fix your problem, but
I know just that it works on my PC.... It's very very
slow... I don't know how to insert PageSetUp option... I have to study the problem.....
However I don't think it's a hard problem....
I want ask to you if you have found some problems when you are in Editing mode in a cell.....
in the jdk1.2 version I could save while was in editing mode using the editingStopped method.
It permit to update all data .... also the data in the cell I was editing.
in the jdk 1.3 if I use this method It doesn't work properly... It maybe destroy the content object in the Cell..... because I'm able to print all the table except the editing cell (it throw an exception...)
What's changed????
I don't know...
Can u help me?

Similar Messages

  • After having yet another problem with my MacBook Pro and having to wipe the drive, I am now unable to sync my iPhones etc without erasing all the music on them. Is there a way around this? I have no other library!

    After having yet another problem with my MacBook Pro and having to wipe the drive, I am now unable to sync my iPhones etc without erasing all the music on them. Is there a way around this? I have no other library!
    iTunes is a mess! It couldn't find it's own libraries and I was forced to create a new one. Now I don't know where my music is or if any's missing.

    columbus new boy wrote:
    How crap is that?
    It's not crap at all.
    It's not that simple. For example, I've 3500 songs on my MacBook but don't want them all on my phone, so I have to manually select each song again???
    There has to be a solution.
    Why not simply make a playlist with the songs you want on the iPhone?
    and maintain a current backup of your computer.

  • Selection Problem with JTable

    Hello,
    i have a selection problem with JTable. I want to allow only single cell selection and additionally limit the selection to the first column.
    I preffered the style from MS Outlook Express where you can select the email accounts to edit.
    It is a table like this:
    Account name  |   Type  |   ...
    --------------|---------|---------------------
    Hotmail       |   POP3  |
    GMX           |   IMAP  |The selection should be only avaibable at 'Hotmail' or 'GMX' - not at 'POP3', 'IMAP' or as complete row selection.
    Please help me!
    Thanks.
    Warlock

    Maybe this will helpimport java.awt.*;
    import javax.swing.*;
    public class Test3 extends JFrame {
      public Test3() {
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        Container content = getContentPane();
        String[] head = {"One", "Two"};
        String[][] data = {{"R1-C1", "R1-C2"}, {"R2-C1", "R2-C2"}};
        JTable jt = new JTable(data, head);
        jt.getColumnModel().setSelectionModel(new MyTableSelectionModel());
        content.add(new JScrollPane(jt), BorderLayout.CENTER);
        jt.setCellSelectionEnabled(true);
        jt.setRowSelectionAllowed(false);
        jt.setColumnSelectionAllowed(false);
        setSize(300, 300);
        setVisible(true);
      public static void main(String[] arghs) { new Test3(); }
    class MyTableSelectionModel extends DefaultListSelectionModel {
      public void setSelectionInterval(int index0, int index1) {
        super.setSelectionInterval(0, 0);
    }

  • Another problem with SOAP sender

    I have another problem with SOAP scenario in a different environment (PI 7.0) from my earlier post.
    Scenario:
    Soap Sender -> PI -> Soap Receiver
    Following steps from GoogleSearch SOAP scenario in the SAP How-to Guide for SAP NetWeaver '04 entitled: "How To... Use the XI 3.0 SOAP Adapter" version 1.00 - March 2006.
    I have loaded in the api.google.com/GoogleSearch.wsdl file as an External definition and created the SOAP receiver as described in the How-to guide.  It takes a doGoogleSearch as input and sends back a doGoogleSearchResponse (Sync Call). 
    Note that the GoogleSearch.wsdl contains a complex type ResultElementArray that refers to ResultElement\[\], and a DirectoryCategoryArray that refers to DirectoryCategory\[\].  The ResultElement and DirectoryCategory types are defined in the GoogleSearch.wsdl file.
    Problem One:
    The generated WSDL for the SOAP sender contains the ResultElementArray and DirectoryCategoryArray types but it DOES NOT contain the required ResultElement and DirectoryCategory types.  XML Spy complains that this WSDL is not valid because the type ResultElement\[\] is not defined.
    Problem Two:
    I generate a SOAP message in XML Spy, provide values for the doGoogleSearch fields, and send.  In SXMB_MONI, the SOAP sender payload contains only the <key> value from the doGoogleSearch message body, i.e. <part name="key" type="xsd:string" />
    The other doGoogleSearch fields seem to be missing, i.e.
      <part name="q" type="xsd:string" />
      <part name="start" type="xsd:int" />
      <part name="maxResults" type="xsd:int" />
      <part name="filter" type="xsd:boolean" />
      <part name="restrict" type="xsd:string" />
      <part name="safeSearch" type="xsd:boolean" />
      <part name="lr" type="xsd:string" />
      <part name="ie" type="xsd:string" />
      <part name="oe" type="xsd:string" />
    Does anyone know why:
    (1) PI/XI seems to leave out the ResultElement and DirectoryCategory types from the SOAP sender service WSDL file?
    (2) The doGoogleSearch message seen in SXMB_MONI contains only the first <key> field, and not the other fields?
    Thanks for any help with this.

    I have another problem with SOAP scenario in a different environment (PI 7.0) from my earlier post.
    Scenario:
    Soap Sender -> PI -> Soap Receiver
    Following steps from GoogleSearch SOAP scenario in the SAP How-to Guide for SAP NetWeaver '04 entitled: "How To... Use the XI 3.0 SOAP Adapter" version 1.00 - March 2006.
    I have loaded in the api.google.com/GoogleSearch.wsdl file as an External definition and created the SOAP receiver as described in the How-to guide.  It takes a doGoogleSearch as input and sends back a doGoogleSearchResponse (Sync Call). 
    Note that the GoogleSearch.wsdl contains a complex type ResultElementArray that refers to ResultElement\[\], and a DirectoryCategoryArray that refers to DirectoryCategory\[\].  The ResultElement and DirectoryCategory types are defined in the GoogleSearch.wsdl file.
    Problem One:
    The generated WSDL for the SOAP sender contains the ResultElementArray and DirectoryCategoryArray types but it DOES NOT contain the required ResultElement and DirectoryCategory types.  XML Spy complains that this WSDL is not valid because the type ResultElement\[\] is not defined.
    Problem Two:
    I generate a SOAP message in XML Spy, provide values for the doGoogleSearch fields, and send.  In SXMB_MONI, the SOAP sender payload contains only the <key> value from the doGoogleSearch message body, i.e. <part name="key" type="xsd:string" />
    The other doGoogleSearch fields seem to be missing, i.e.
      <part name="q" type="xsd:string" />
      <part name="start" type="xsd:int" />
      <part name="maxResults" type="xsd:int" />
      <part name="filter" type="xsd:boolean" />
      <part name="restrict" type="xsd:string" />
      <part name="safeSearch" type="xsd:boolean" />
      <part name="lr" type="xsd:string" />
      <part name="ie" type="xsd:string" />
      <part name="oe" type="xsd:string" />
    Does anyone know why:
    (1) PI/XI seems to leave out the ResultElement and DirectoryCategory types from the SOAP sender service WSDL file?
    (2) The doGoogleSearch message seen in SXMB_MONI contains only the first <key> field, and not the other fields?
    Thanks for any help with this.

  • Hi everyone,I have an Iphone 4S,when I updated iOS 7 my phone got slow,so please help me how to downgrade it to 6.1.3 or 6.1.3,I have another problem with iOS 7,I cant request my credit balancing,when i type *101

    Hi everyone,I have an Iphone 4S,when I updated iOS 7 my phone got slow,so please help me how to downgrade it to 6.1.3 or 6.1.3,I have another problem with iOS 7,I cant request my credit balancing,when i type *101# automatically calls and says "this number dows not excits",I wnat iOS 6.1.2 back ..

    sorry for my bad english ..

  • A problem with JTable

    Hi !
    I have a problem with JTable - would like to use this component as a simple list of rows taken from a database : don't want to be able select or set a focus to a column - want only to be able select and set focus to a row ( just like in the menus). How to disable "focusability" for a cell with JTable ? Could You help me ?
    thnx in advance

    The Border is changed by the renderer, depending on whether the cell has focus or not. So you will need to create custom renderers without a Border. Something like:
    class NoBorderRenderer extends DefaultTableCellRenderer
         public Component getTableCellRendererComponent(
              JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
              super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
              setBorder(null);
              return this;
    }

  • Problem with JTable and JPanel

    Hi,
    I'm having problems with a JTable in a JPanel. The code is basicly as follows:
    public class mainFrame extends JFrame
            public mainFrame()
                    //A menu is implemeted giving rise to the following actions:
                    public void actionPerformed(ActionEvent evt)
                            String arg = evt.getActionCommand();
                            if(arg.equals("Sit1"))
                            //cells, columnNames are initiated correctly
                            JTable table = new JTable(cells,columnNames);
                            JPanel holdingPanel = new JPanel();
                            holdingPanel.setLayout( new BorderLayout() );
                            JScrollPane scrollPane = new JScrollPane(holdingPanel);
                            holdingPanel.setBackground(Color.white);
                            holdingPanel.add(table,BorderLayout.CENTER);
                            add(scrollPane, "Center");
                            if(arg.equals("Sit2"))
                                    if(scrollPane !=null)
                                            remove(scrollPane);validate();System.out.println("ScrollPane");
                                    if(holdingPanel !=null)
                                            remove(holdingPanel);
                                    if(table !=null)
                                            remove(table);table.setVisible(false);System.out.println("table");
                            //Put other things on the holdingPanel....
            private JScrollPane scrollPane;
            private JPanel holdingPanel;
            private JTable table;
    }The problem is that the table isn't removed. When you choose another situation ( say Sit2), at first the table apparently is gone, but when you press with the mouse in the area it appeared earlier, it appears again. How do I succesfully remove the table from the panel? Removing the panel doesn't seem to be enough. Help is much appreciated...
    Best regards
    Schwartz

    If you reuse the panel and scroll pane throughout the application,
    instantiate them in the constructor, not in an often-called event
    handler. In the event handler, you only do add/remove of the table
    on to the panel. You can't remove the table from the container
    which does not directly contain it.
    if (arg.equals("Sit2")){
      holdingPanel.remove(table);
      holdingPanel.revalidate();
      holdingPanel.repaint(); //sometimes necessary
    }

  • Is this yet another problem with 7.5 or is it just me . . .

    Upgrade seemed to be fine, at first . . . now I keep getting distortion on songs. It seems to be quite random and just because a song has been distorted when I've listened to it once doesn't mean it will be when I listen to it again! It's driving me insane. Is this yet another bug or have I done something wrong (apart from upgrading to 7.5).

    Hi Emlou,
    If you have a Windows based operating system such as XP -
    It seems to me that you are suffering what I am having the same problem with - the program takes up to much of your computer's processing usage. If you go into your task manager and watch performance as ITunes runs - you will see how much of the total computer usage it is taking at any given moment - that's why your songs are distorted, slowing, garbled, etc - the usage on mine spikes from 11% - 93% AT ANY GIVEN MINUTE! I have no idea why, but I have found that by going to your "Control Panel" and clicking on Quicktime you can adjust audio output to help. Click the audio tab, click Safe Mode Wavout only (checkbox) / Then adjust the "Rate" to 96kHz / Then adjust the "Size" to 16 bit. Close that and shut down and restart Itunes - it might help a little for you.
    Maybe someone out there can help us find out why we are suffering with all the CPU usage trouble and how to adjust that spiking.
    Thanks!
    Paul

  • (Another) Problem with HP Photosmart - reinstallation

    I have a Photosmart C5280 All-in-One and a MacBook Pro, with 2.4 GHz Intel Core 2 Duo processor, using Mac OS X 10.4.11.
    Scenario this morning:
    The printer will photocopy, but there is no connection between the printer and the computer, it is not a problem with the usb cable connection. The computer will not send anything to the printer to print, and the scanner will not end anything to the computer.
    I repaired permissions using disk utility at least three times this morning. (I do it fairly often anyway).
    Scenario now:
    I have now uninstalled the software, using the HP uninstall programme, but then deleted the remaining items manually as instructed in the section on the HP site for Macs and uninstallation. I have also emptied the trash.
    Sadly however, it has made absolutely no difference. Whenever I put the installation disk into the CD drive, I can only get as far as identifying the printer. There are no printers listed, and when I tick the box, it comes up with Photosmart C5200 Series, which is correct. But the next continue box is then greyed out. (I'm wondering if following the HP instructions was such a good idea now).
    I am now stuck. I have uninstalled and can not reinstall. I have used these two together for the past year (or more) without any problems. When I initially installed, it worked fine. No problems at all. I have not recently changed any software or upgraded anything on the OS. The two were communicating last week, when I did some scanning and printing.
    Confession: I had the first problem (no scanning/printing) a couple of weeks ago, and decided to look in trash to see if I had mistakenly got rid of something and found an hp file in there. Pulled it back out. All worked fine again. But today, total blip, and no hp files in trash.
    I would be grateful if anyone could suggest a solution. I'm capable of following instructions. Oh, I have mailed Hp, but I've had no response so far. I have also looked through the stuff on here, but haven't found a similar problem, ie the connection just disappears into the ether.

    I had a response from HP:
    1) Was the printer powered on? It needs to be turned on.
    2) Was the USB plugged directly from the back on the printer to the Mac? You are not using a hub, airport or a USB cable more than 10 feet long?
    3) Power cycle the printer. Disconnect the power cord from the back of the printer. Wait 10-15 seconds and reconnect the cord. Power on the printer. Was it found?
    4) If not, restart the Mac. Once you are back up, if the HP setup Assistant does not automatically launch you can launch it by clicking on Hard Drive > Applications > Hewlett-Packard > Utilities or Device Utilities > HP Setup Assistant. Double click to launch. Was it found?
    5) If not, plug the USB cable into a different port on the computer. Was it found?
    6) If the printer is still not found, check the system profiler for the device. Click on the Blue Apple in the upper left corner, then About this Mac. On the next screen click on More Info. On the System Profiler screen, click on USB under Hardware. On the right is the printer found under USB device tree?
    7) Another thing we need to check is when you installed the software did you select the correct device. The newer printer software may contain multiple products. If you did not select the correct device during the install, the computer is looking for a different device and not finding it. To check this, run the HP uninstaller. Open Hard Drive> Applications > Hewlett-Packard > HP Uninstaller. When you get to uninstall selected device, what printer is listed. If it is not you model series, run the uninstaller. Quit the uninstaller when complete, disconnect the USB cable and restart. When you back to the desktop, empty the trash, and reinstall the software. Wait for the option to select your device!
    I want to be sure the troubleshooting steps I provided resolve the issue. If the issue continues, please reply to this message with the results. We will be glad to assist you further.
    It was not unreasonable, but I had checked the box that said Intermediate (level of computer knowledge) - so I thought asking me if the printer was turned on/checking the ports/ etc etc was a little basic.
    However on browsing this forum for similar probs I noticed a reference to Printer Setup Repair (it may have been one of your suggestions BDAqua to a different problem) so downloaded it for a free trial. Although I regularly verify and repair permissions with disk utility, I tried with Printer Setup Repair, and got this message:
    Monday, December 15, 2008 12:16:04
    Starting permission verification and repair, omitting localized files...
    The file /private/var/log/cups/page_log is missing!
    The directory /usr/include is missing!
    The directory /usr/include/cups is missing!
    The file /usr/include/cups/cups.h is missing!
    The file /usr/include/cups/http.h is missing!
    The file /usr/include/cups/image.h is missing!
    The file /usr/include/cups/ipp.h is missing!
    The file /usr/include/cups/language.h is missing!
    The file /usr/include/cups/md5.h is missing!
    The file /usr/include/cups/ppd.h is missing!
    The file /usr/include/cups/raster.h is missing!
    Recreating symbolic links...
    Done.
    Verification complete.
    837 files examined. No problems were found.
    11 missing files/directories found during the verification process. They may be responsible for certain printing problems. Printer Setup Repair cannot replace these items. Please refer to the log file for a list of the missing files/directories. You may need to reinstall OS X to resolve your printing issues. Certain files and directories are deleted when using the Reset Printing System option. These files and directories, if required, will be recreated during normal printing.
    That message would explain why, the last time I had a problem, it was resolved with reinstalling OS X. What I don't understand is why a file suddenly disappears? Perhaps I need to move my queries to one about OS X? (I have OS X on my other Apple and no probs there.)
    Anyway, thank you for your responses and if you have any further advice or suggestions, I would be happy to hear.
    ST

  • Scrollbar problem with JTable.

    Hi,
    I have 45 columns in a JTable. Please remember this is customize, we can change the number of columns dynamically, at max they can be 2 columns.
    i was having a problem with display the columns names in my Frame. I posted at http://forum.java.sun.com/thread.jspa?threadID=5167358&messageID=9641265#9641265
    I got the solution. Thanks for that.
    But as i said these columns are customized.
    when i am having 2 columns in my JTable, table.setAutoResizeMode( JTable.AUTO_RESIZE_OFF ); is behaving differently, it's not occupying the complete JFrame. Lots of space is left out beside these 2 columns.
    When i comment this line, then those 2 columns are occupying my complete Frame.
    these two colmns should occupy my complete Frame and if i select 45 columns i should get scroll bar at botton with complete column NAMES.
    Hope i am clear.
    My Snippet
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.table.*;
    import java.util.*;
    public class SimpleTable extends JPanel {
        private boolean DEBUG = false;
        public SimpleTable() {
            super(new BorderLayout());
                        String[][] values = new String[10][];
            String[] columnNames = {
                                                                                    "First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian","First Name","Last Name","Sport","# of Years","Vegetarian"
            Object[][] data = {
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)},
                {"Mary", "Campione",
                 "Snowboarding", new Integer(5), new Boolean(false)},
                {"Alison", "Huml",
                 "Rowing", new Integer(3), new Boolean(true)},
                {"Kathy", "Walrath",
                 "Knitting", new Integer(2), new Boolean(false)},
                {"Sharon", "Zakhour",
                 "Speed reading", new Integer(20), new Boolean(true)},
                {"Philip", "Milne",
                 "Pool", new Integer(10), new Boolean(false)}
                        DefaultTableModel defaulttablemodel = new DefaultTableModel(data,columnNames);
            final JTable table = new JTable(defaulttablemodel)
                 public boolean isCellEditable(int row,int column)
                                  return false;
                        table.setPreferredScrollableViewportSize(new Dimension(500, 70));
                        //table.setAutoResizeMode( JTable.AUTO_RESIZE_OFF );
                        JScrollPane scrollPane = new JScrollPane(table);
                        add(scrollPane);
        private static void createAndShowGUI() {
            JFrame frame = new JFrame("SimpleTable");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            SimpleTable newContentPane = new SimpleTable();
            newContentPane.setOpaque(true); //content panes must be opaque
            frame.setContentPane(newContentPane);
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }

    Thank You camickr, it's serving my purpose.
    Just for a clarrification :
    table.setAutoResizeMode( JTable.AUTO_RESIZE_OFF );
    table.setAutoscrolls(false);without using these lines also my purpose is serving.....then y do we need above two lines of code. r they necessary
    i mean, this snippet is sufficient.
    public boolean getScrollableTracksViewportWidth()
         return getPreferredSize().width < getParent().getWidth();
    }

  • Problems with JTable Renderer

    I have a problem with applying a custom renderer. I know the renderer works so thats not the problem. If I do like this:
    DefaultTableModel aDefaultTableModel = new DefaultTableModel(data, columnNames);
    it works. But if I do like this:
    DefaultTableModel aDefaultTableModel;
    aDefaultTableModel.setDataVector(data, columNames);
    is doesn't, why?

    I think maybe it's not the renderer at all. It may be my custom TableModel thats causing problems. Now this doesn't work:
    private JTable aTable;
    private CustomTableModel aTableModel;
    public MyProgram() {
    aTableModel = new CustomTableModel();
    aTable = new JTable(aTableModel);
    aTableModel.setData(data, columnNames);
    private class CustomTableModel {
    private String[] columnNames = null;
    private Object[][] data = null;
    public CustomTableModel() {
    columnNames = new String[0];
    data = new Object[0][0];
    ... snip
    public void setData(Object[][] data, String[] columnNames) {
    this.data = data;
    this.columnNames = columnNames;
    fireTableDataChanged();
    ... snip
    Now, why doesn't that setData method work??

  • Problems with JTable

    Hi All,
    I am facing some problems in JTable :
    1) How to remove all lines between cells, neither i should have column nor row lines....there should not be any lines between any cell at all.
    2) If i select a perticular cell, complete row is getting selected with a blue background, that should not happen at all.....row should not get select....
    3) How to make a cell non editable.
    Regards,
    Ravi

    1) Read the API. Check out the set??? methods until you fine what you want
    2) Read the API. Check out the methods that deal with row and column selection
    3) Override isCellEditable(...) method of JTable or DefaultTableModel

  • Another Problem with my Apple products "iTunes could not connect to this iPhone. This device is no longer connected."

    when connect my ipad a my rmbp 15" appears this message "iTunes could not connect to this iPhone. This device is no longer connected." and ipad  is connected and disconnected all the time. but when connect the Ipad in my rmbp 13" not have a problem.
    Please I need help. i hope not to have another disappointment with  apple product.

    iTunes could not connect to this iPhone. This device is no longer connected.
    iPad 2 7.1.2
    iTunes 11.3 (54)
    iMac 27 in 10.9.4
    Follow these steps to resolve your issue for iPads
    Troubleshooting time is about 30 minutes - 1 hour
    Step 1
    Unplug the usb 2.0 cord from the 27 in iMac and iPad 2 64 GB (or what ever version you have) Power down the iPad
    Step 2
    Select your HD (Hard Drive) ( I did  this form my desk top)
    Next select the applications folder, Next right click the iTunes icon and select show package contents, select Contents.
    1.     Next select info.plist, right click and select move to trash (A message should appear Finder wants to make changes. Type your password to allow this)(Enter your password) Select ok, (This moves the file to the trash).
    2.     Next select pkginfo, right click and select move to trash. (A message should appear Finder wants to make changes. Type your password to allow this)(Enter your password) Select ok, (This moves the file to the trash).
    3.     Next Select version.plist, right click and select move to trash (A message should appear Finder wants to make changes. Type your password to allow this)(Enter your password) Select ok, (This moves the file to the trash).
    4.     Remove "iTunes" from your dock
    5.     From the Finder, choose Go > Go to folder.
    6. Type the following and then press Return:
/var/db/lockdown
    7. Choose View > as Icons.
    8. The Finder window should display one or more files with long alphanumeric file names.
    9. In the Finder, choose Edit > Select all. Then, choose File > Move to Trash. Enter an administrator password if prompted.
Note: Do not delete the Lockdown folder itself.
    Delete only the files contained inside the Lockdown folder.
    Step 3
    Follow the below steps to troubleshoot the issue.
    1. In Finder, click the Go menu and then choose Go to Folder. Enter the following location into the text field that appears:
/System/Library/LaunchDaemons
    2. Click Go.
    3. Locate the file "com.apple.usbmuxd.plist~orig" and drag it to the Trash. (Do not move the similarly named "com.apple.usbmuxd.plist" file to the Trash.) If you DO NOT HAVE file "com.apple.usbmuxd.plist~orig" I DELETED THE FOLLOWING (com.apple.usb.plist)
    4. In the Finder, locate iTunes in the Applications folder and drag it to the Trash. (This will not remove any of your iTunes media or your iTunes library.) You may be presented with the following message “iTunes” can’t be modified or deleted because it’s required by OS X.) Do not worry click ok and proceed troubleshooting
    5. Choose Go > Go to Folder. Enter the following location into the text field that appears:
/System/Library/Extensions
    6. Click Go.
    7. Locate the file "AppleMobileDevice.kext" and drag it to the Trash.
    8. In Finder, click the Go menu and then choose Go to Folder. Enter the following location into the text field that appears:
/System/Library/PrivateFrameworks
    9. Click Go.
    10. Locate the folder "MobileDevice.framework" and drag it to the Trash.
    11. In Finder, click the Go menu and then choose Go to Folder. Enter the following location into the text field that appears:
/System/Library/LaunchDaemons
    12. Click Go.
    Step 4
    Goto your hard drive in the finder
    1.     Goto Library
    2.     Goto Launch Daemons
    3.     Throw this in the trash: com.ghughes.wifisync.root.plist and anything with the words iTunes
    4.     Goto Library
    5.     Goto Application Support
    6.     Throw this in the trash: Wi-Fi Sync (it's an entire folder) and anything with iTunes
    Step 5
    (Before restart book mark the link command and D). Restart the Mac.
    Download iTunes and reinstall it. After the install, connect the 2.0 usb device to the iPad 2 while the unit is still powered off, next connect the 2.0 usb cord to iTunes, power the iPad on. iTunes will read the device and ask to trust device, select continue. Backup the iPad device to the 27 in iMac.
    Step 6
    Please Rate if it helped you! After that have a cold hard drink and enjoy the day

  • Another Problem With Memory..

    Ok, so recently I just posted that I had a problem with mem... here is another. I just checked how much memory I'm using and it says I'm using 989 out of 1 gb.. is that normal? It was 504 about an hour ago and all I have open are Adium and Safari..

    The two important questions are 1) how much is inactive and 2) how many page outs are you showing in virtual memory. In fact, the second question is the one to key on. The number of page outs will indicate how often your computer has tried to access more memory than it has and as therefore been forced to copy RAM contents to the drive so it could perform the task it was asked to do. This is when your computer is being slowly choked to death.
    Now don't just open the Activity Monitor, look at the Page ins and Page outs and panic because you have 30,000 page outs. Keep in mind that's an accumulative number and if your Mac hasn't been restarted for 90 days, well that number may not be relevant at all. So restart the computer, and use it as you normally do. Then check the status of Page Outs at 30 minute intervals. The faster the Page Outs mount up with your normal usage the more you'll benefit from an upgrade.

  • Another problem with G4 500mhz

    Ok i solved my earlier problem with the power, now I have another. But this time its not real serious. Well as you know I bought my computer used from the highschool through a auction, well i finally got my computer to turn on, but now when it turns on, 2 user profiles pop up asking for passwords (one of them being a teachers side). And I have no clue how to get around this. So if theres any way please let me know. Thanks

    Well… the nicest solution would be to reformat the drive and reinstall Mac OS X and the software you need to use. Thing is, I'm assuming you don't have have Mac OS X or software.
    So, one thing you can do is to contact AppleCare (their number will be in Apple's support pages) and have them send you out a replacement copy of the installation discs. They'll charge you a nominal fee for doing so but I highly recommend you do this.
    That'll get you started.
    If you want to do anything tricker than that you will probably need some else's help as well as the help of their Mac. Otherwise, you can just duck down to an Apple Store/Reseller and get yourself a copy of Mac OS X 10.4 (Tiger) and iLife 06. More expensive although will be all current versions rather than the Mac OS X 10.2 (Jaguar) that comes with a 500MHz Titanium.

Maybe you are looking for

  • Bluetooth deamon crashed OS X 10.5.6

    This crash happened soon after startup. From crash reporter log: Process: blued [46] Path: /usr/sbin/blued Identifier: blued Version: ??? (???) Code Type: X86 (Native) Parent Process: launchd [1] Date/Time: 2009-02-07 10:10:03.949 -0500 OS Version: M

  • Execute Immediate in Oracle 10g

    Hi , I have a small doubt regarding execute immediate. As per my knowledge we use execute immediate for writing DDL(create,truncate,...) statements to execute in the procedure or function. But i have seen in my organization , some of the senior peopl

  • NIO and object serialization

    I try to use the new IO API to implement a non-blocking multi-threaded server that communicates with client applications by exchanging serialized objects. I started from the code in the JavaWorld article at http://www.javaworld.com/javaworld/jw-09-20

  • JPG from Illustrator not showing properly

    Hi, I'm using Illustrator CS4 to make still images like backgrounds and other stuff for my videos. I export them as JPG using the "Use artboard" export option in Illustrator and select "All" so all the artboards export at once. I end up in this case

  • How to show a:active is selected?

    In the Spry horizontal menu, I would like to indicate which page in the menu is selected by making the text bold. Is it possible for a novice to achieve? thanks