Overriding getColumnClass: A working example, if you would, please?

I've read that using an @Override of the getColumnClass method is usefull when you
have a table full of ints or bytes and you want to avoid using code like this extensively:
Integer.valueOf(jTable1.getValueAt(0, 0).toString());I've got a snippet here that shows the actual code used in the framework:
    public Class<?> getColumnClass(int columnIndex) {
     return Object.class;
    }but when I put it into a working example:
package tableclass;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTable;
public class EditorTest extends JFrame
        JTable table = new JTable(10, 5){
            @Override
    public Class<?> getColumnClass(int columnIndex) {
     return Object.class;
    public EditorTest()
        table.setPreferredScrollableViewportSize(table.getPreferredSize());
        JScrollPane scrollPane = new JScrollPane( table );
        getContentPane().add( scrollPane, BorderLayout.SOUTH);
    public static void main(String[] args)
        EditorTest frame = new EditorTest();
        frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
        frame.pack();
        frame.setLocationRelativeTo( null );
        frame.setVisible(true);
}I have no idea what to put in the override to make it usefull.
could someone please give me an idea of what to put here?

camickr wrote:
I read the tutorial,Then where is your SSCCE that shows you overriding the getColumClass() method from the example you found in the tutorial.
I scoured google for getColumnClassI never said anything about Google. I suggested you search these forums.
If someone had suggested overriding the getValueAt method to return an int or a byte insteadBecause that is not the way to do it and that is not the way the tutorial example works. The tutorial stores different Object types, Data, Boolean, etc. The question you asked was not about storing data it was about overriding the getColumnClass(...) method.
If you would have posted the code from the tutorial and asked a specific question about the code, then you would get an explanation.
But the code you posted gave no indication whatsoever that you bothered to take the time to read the tutorial or search the forum, because the code you posted looked nothing like anything found in the tutorial or anything that you could have found in the forum.
I was under the impression that overriding this method would let me return data primitives without having to parse or cast them out.Well, that is not what your question asked. We are not mind readers.
Your question asked for an example of how to override a specific method. Why should we waste time creating an example, when the tutorial and forums are full of examples?Apologies.

Similar Messages

  • Since updating to this new version my facebook game farmville will not work properly can you help please

    i have farmville on my facebook page.since updating to this new version of firefox it will not load certain things from farmville.can you please advise

    Hi
    Are you still facing the same error ? If yes, are you getting this error everytime you are trying to export ?
    Please try again and check.
    This is basically a compilation error , where files are not converted into proper format correctly.
    Thanks,
    Sanjit

  • Hi, I have photoshop CC. It's the french version but I would like to have it in english. I went in the creative cloud to change the language but it doesn't seem to work. Do you know how i could do it ?

    Hi, I have photoshop CC. It's the french version but I would like to have it in english. I went in the creative cloud to change the language but it doesn't seem to work. Do you know how i could do it ?

    Please indicate whether or not the following link helps... I have not had to use it and so I do not know if/when it does help.
    Creative Cloud Help / Adjust the install language | Creative Cloud applications | CCM -
    http://helpx.adobe.com/creative-cloud/kb/change-installed-language.html

  • I purchased an additional audio function for the apps "baby monitor"today, but this function didn't work on my ipad. Grateful if you would let me know how to refund the cost.

    I purchased an additional audio function for the apps "baby monitor"today, but this function didn't work on my ipad. Grateful if you would let me know how to refund the cost.

    Refund
    http://www.apple.com/emea/support/itunes/contact.html

  • While listening to a podcast on my iPhone I can e-mail the podcast ID. The email contains the url for the specific podcast. So you would assume that you could put that url into iTunes and it would take you to the podcast. This used to work but no longer.

    While listening to a podcast on my iPhone I can e-mail the podcast ID to share it with someone else. The email contains the url for the specific podcast. So you would assume that you could put that url into iTunes and it would take you to the podcast. This used to work but no longer. Months ago when I would e-mail myself the url all I had to do was click on the link in the e-mail and it took me right to the specific podcast in iTunes. Now it only opens iTunes and I can't figure out how to find the specific one. What good is the e-mail tab on the iPhone if it doesn't connect you to the podcast you sent?

    Same here. I just posted a question too.

  • How do I disable those pesky "hover-over" pop ups? I tried the method of right clicking on them and opting out, but it doesn't work. If you guys could add some kind of blocker to your browser, it would be a huge plus!

    # Question
    How do I disable those pesky "hover-over" pop ups? I tried the method of right clicking on them and opting out, but it doesn't work. If you guys could add some kind of blocker to your browser, it would be a huge plus!

    Chris CA wrote:
    Did you createa smart playlist? It's purple with a gear icon.
    And you set the criteria to
    Match rule:
    Date added is in the last two weeks?
    I tried it, but couldn't get it to work. I think I had trouble with the Rule. I put a Rule in as follows: Data added in the last five hours? I added music (data) but nothing appeared in my Smart Playlist. Oh yes - I named the playlist: Recently Added.
    What did I do wrong? Is it necessary to have a question mark at the end of the Rule? I couldn't find anything on how to create a Smart Playlist in Help. There is stuff in there, but it does not go into much detail, i.e., nothing on the proper wording of the Rule.

  • I want to know how much would it cost me to change the plug of my 4S headphones because it doesn't work and do you take old devices and give me a new one?

    I want to know how much would it cost me to change the plug of my 4S headphones because it doesn't work and do you take old devices and give me a new one?

    No. That's not what I said. You can get an out of warranty replacement, which will be exactly the same model, color, and will be locked in exactly the same way the original is. If you want an iPhone 5, get the 4S replaced, sell it, and use the money to put toward a new phone.

  • Firefox 13 and 14 will not install properly on my windows 7 starter. Also I cannot get the Scrapbook addon to work. Can you tell me why ?

    I have tried to install Firefox 13 and 14 on my netbook, running a Windows 7 starter OS. The installation begins to go smoothly from the setup.exe file; but after the installation seems complete, and I press the 'Open Firefox' button the firefox programme can be seen to start opening because it accumulates about 50mb of private bytes RAM on the windows task manager or on the 'process explorer' utility program by sysinternals. '''However the firefox screen/window never opens up and so firefox does not seem to be properly installed.'''' Also I have had problems with getting the Scrapbook" addon to install properly. I have another computer, a laptop, running XP Home, and I can get the Firefox 13 or 14 to install but it is on this other computer that I cannot get the 'Scrapook' addon to install properly; There is no notice on the Addon page saying the 'Scrapbook' addon does not work on Firefox 13 or 14, and the addon does install, but not properly, so it does not work.
    I have the old Firefox setup.exe files, and so I have managed to install an old version, firefox 3 or 4, on an external hard drive. I have successfully got this old firefox to work on the XP Home laptop from an external hard drive, and can successfully use the 'Scrapbook' addon in this way.
    I cannot understand why I have problems with Firefox 13 or 14. I think I first noticed the problem about 'Scrapbook' with Firefox 12.

    It seems your Mozilla installation is broken. Try the following steps to fully uninstall Mozilla Firefox:
    1. Uninstall Firefox as you would normally do.
    2. Open a command prompt as administrator.
    3. By using the cd and rd command, remove Firefox AppData and Roaming folders, for example:
    C:\Users\USERNAME> cd AppData
    C:\Users\USERNAME\AppData> cd Local
    C:\Users\USERNAME\AppData\Local> cd Mozilla
    C:\Users\USERNAME\AppData\Local\Mozilla> rd /s Firefox
    C:\Users\USERNAME\AppData\Local\Mozilla\*.* - Are you sure? (y/n) y
    C:\Users\USERNAME\AppData\Local\Mozilla> cd ..
    C:\Users\USERNAME\AppData\Local> cd ..
    C:\Users\USERNAME\AppData\> cd Roaming
    C:\Users\USERNAME\AppData\Roaming> cd Mozilla
    C:\Users\USERNAME\AppData\Roaming\Mozilla> rd /s Firefox
    C:\Users\USERNAME\AppData\Roaming\Mozilla\*.* - Are you sure (y/n) y
    C:\Users\USERNAME\AppData\Roaming\Mozilla > exit
    Remember to press Enter each time.
    4. After that, open a hard disk clean-up tool (such as CCleaner or Windows built-in) and remove all temporary files from your computer.
    5. Restart your computer. Download '''again''' the Firefox package from [http://www.mozilla.org/es-ES/download/?product=firefox-14.0.1&os=win&lang=es-ES Mozilla official servers] and try to install Firefox. If the problem persists maybe your computer has a problem or is infected with viruses.
    About the Scrapbook add-on, I could get it to work. It has no icon when docked to the toolbar, but you can anyway open it. Right-click a button on the toolbar, click Customize... find the Scrapbook icon, drag it to the bookmarks bar so you can see the icon and click on it to open it. Whenever you need to save a page, right-click that page and choose Save page.

  • WORKING example of BlazeDS with Flex 3 and FlexBuilder

    Can someone point me to an actual working example with BlazeDS used with Flex 3 and Eclipse?
    The examples on livedocs are broken or imcomplete. Others work to varying degrees but fail at some point.
    What I'd like to see is the following:
    1. How to create a project using
         a. Flex 3.0
         b. BlazeDS
         c. Eclipse - FULL project creation and deployment instructions.
         d. An example where the project is NOT created within the BlazeDS webapp that comes with the BlazeDS/Tomcat combo.
         e. An example where the ENTIRE project can be compiled and deployed to Tomcat in one shot.
         f.  An example where a DB can he altered using standard CRUD methods with the display displaying updated records without and event being used to
             refresh the view of the records.
    This shouldn't be too much to ask if Flex is to be expected to be taken seriously in data-driven applications. I've looked all over the web for weeks for something likethis and have come up with nothing. I don't need Spring or Hibernate at this point. Any help would be greatly appreciated as I'm working on a proof-of-concept at this time and the pressure is mounting to come up with something.
    Thanks!

    here is some stuff I wrote while back(they both have recorded video you can watch);
    http://ledtechdesign.com/2009/02/blazeds-tutorial-part-i-simple-remoting/
    http://ledtechdesign.com/2009/02/tutorial-blazeds-simple-remoting-part-ii-flex/

  • Does somebody has working example how retrieve ALL message ids from queue

    hello,
    i'm having problems retrievieng all message id's from queue using APPQ_MIB. Point
    is that i can't get cursor variable work. Somebody possibly has working example
    or knows how it is done in qmadmin? I'm using Tuxedo 8.0.

    The default CURSORHOLD time is 120 seconds. Are you making your second
    request within that time? And make sure that you change TA_OPERATION to
    GETNEXT.
    Janis Kovalevskis wrote:
    Actually there is no debugging required it is enough to use ud32. I created sample
    file (see attach), where is what i'm sending to MIB. For Part 1 everything is
    fine- i get first ~200 message id's and cursor variable, but when i send Part
    2 (substituting TA_CURSOR with returned value) nothing happens. Returned buffer
    is something like:
    TA_ERROR     0
    TA_MORE     0
    TA_OCCURS     0
    TA_CLASS     T_APPQMSG
    You can even send cursor variable TA_CURSOR like: "..TMIB0: 0x99999999" and same
    response will be returned.
    It seems T_APPQMSG is just ignoring those cursors and thats all. Any ideas?
    Scott Orshan <[email protected]> wrote:
    I think it would be easier for us to debug what you have than to write
    a
    new example from scratch. Please post a code sample that is not working
    for you. Make sure you use GETNEXT is you are using the cursor.
         Scott Orshan
    Janis Kovalevskis wrote:
    hello,
    i'm having problems retrievieng all message id's from queue using APPQ_MIB.Point
    is that i can't get cursor variable work. Somebody possibly has workingexample
    or knows how it is done in qmadmin? I'm using Tuxedo 8.0.------------------------------------------------------------------------
    -- Part 1 --
    SRVCNM     .TMIB
    TA_CLASS     T_APPQMSG
    TA_OPERATION     GET
    TA_LMID     SITE1
    TA_QMCONFIG     /ora4/iia/cfg/QUE
    TA_APPQSPACENAME     QSPACE
    TA_APPQNAME     STIP_ISS_SAF
    TA_CURSORHOLD     300
    -- Part 2 --
    SRVCNM     .TMIB
    TA_CLASS     T_APPQMSG
    TA_OPERATION     GETNEXT
    TA_CURSOR     ..TMIB0: 0x12345678
    TA_CURSORHOLD     300

  • Simple (you would think) Automator workflow

    Hi all,
    I have been using Mac for the last 3 years. I have a very good knowledge of computers in general, Unix/Linux in particular but I have never used Automator. I would like to create a very simple application in Automator: when I click on the application icon I want to see a form in which I type the name of a song and as a result I want to see a window that contains all the music files that match that name.
    I have no problem in creating this as a unix shell script and I know I can use spotlight (the problem with spotlight is that everytime I have to type the search string, click on Show All, then refine the search by setting Kind=Music etc.)
    So I thought it would be a piece of cake to do it in Automator.
    I'm using the action "Find Finder Items" with "Name Contains" AND "Kind is Audio". If I run this in automator I get the results I want (if I click on the Results tab). However, when I save it as Application and then double click on it, I get the input window in which I can specify the name of the songs I'm looking for (so far so good) but then nothing appears, the application seems to terminate correctly but I am never presented with the results.
    I have tried to add a "Reveal Finder Items" after the first action but that's not what I want as it opens one window for each file that matches my search and each window shows all files, with the one I'm looking for highlighted.
    What I need is something similar to spotlight, I want a window to open, showing all files that match. I know I can add more actions and for example copy all files that match into a specific folder then open the folder, but that's a dirty way of solving my problem and a bit of an overkill. Aliases would be slightly better, but still not exactly what I want.
    This is driving me crazy, you would think it should be a very easy thing to accomplish with Automator...
    Any help would be greatly appreciated.
    TIA
    /Pippo

    thanks, but it still doesn't do what I want.
    1) not all my music is in iTunes, so I can't use the Find in iTunes action
    2) adding a Choose from List (as you suggested) after the Find Finder Items now shows me a list of all matches, so that is an improvement, thanks, but I stil can't do anything with that. What I need is a Finder window with the result of the search so that I can simply QuickView the song (or copy it or whatever)
    3) using the Finder search is similar to using spotlight, it doesn't do what I want, I don't want to have to type each time that I'm only looking for songs.
    I just want an Automator workflow that:
    1) asks for a file name
    2) searches my computer for audio files that match the name
    3) shows the result in a window where I can then work with the files.
    it really bugs me that I can't make Automator perform such a simple workflow, I'm sure I'm missing some obvious action.
    please help
    TIA
    /pippo

  • Can someone point me to a small working example using wait()

    Or is wait() what I want to use?
    I need to have my app go to sleep for some period of time, say ten or fifteen minutes, and hide its window during that time. Then after that ten minutes it opens its window back up.
    I've looked all over Google and I can't find any code samples that a newbie could make sense of. Can anyone point me to a sample?
    I wrote what I thought, intuitively, was the way to do it, but I am getting some cryptic message on the "wait()" about "java.lang.IllegalMonitorStateException" which I looked up, but the "explanation" makes even less sense than the raw message. :(
      public void runLoop() {
        getPrefs();
        while (true) {
          ... do stuff ...
          try {
            wait(1000*timeOut);
          } catch ( InterruptedException ie )  {
            ... do stuff ...
      }thanks for any guidance.
    --gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Can someone PLEASE point me to a working example?
    I use Java only very rarely, and only when forced to, and I am not an expert. Frankly, in spite of being expert in a dozen other languages I am COMPLETELY INCOMPETENT in Java. I'm just trying to get this project done and out of my hair so I can safely forget all about Java for the next year or two. I'd give the project to someone else, but every other coder in the shop refuses to go anywhere near Java.
    If I can get this one thing working I can call the project done and be out of here.
    I have a working ap that just needs to close its own window when a button is clicked, for some (user specified) period of time like 10 or 15 minutes, and then reopen its window after that period of time. It is intuitively obvious that I should be able to use timer methods, or sleep() , or wait(), but I have not been able to get any of those to work, and the error messages are more cryptic than ancient Sumerian cuneiform.
    I've Googled for a working example, but haven't found anything that I can figure out. The examples I've found presuppose far more expertise than I posses, and have far too many pieces missing. Can anyone just point me to a complete example of an ap that sleeps for some period of time and then wakes up again?
    I would really, really appreciate the help, and once I've finished this project I promise I won't ever bother you again. Really.
    --gary                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How can I bring 2 photos in Creative Cloud to work on?  I would like one as a background the other I want to cut something out to put in the background.

    How can I bring in 2 photos to use in Creative Cloud to work on?  I would like one as a background and the other I would like to cut something out and put it in the background picture.  Help Please!

    Creative Cloud is not a program, it is a marketing and delivery process
    http://www.adobe.com/products/creativecloud/faq.html
    http://helpx.adobe.com/creative-cloud/help/install-apps.html to install or uninstall
    http://forums.adobe.com/community/download_install_setup/creative_cloud_faq
    What it is http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html
    Cloud Getting Started https://helpx.adobe.com/creative-cloud.html
    So... what is the name of the program you are using?

  • HT204416 My Safari is no longer working with many sites.  However Chrome and Firefox work fine.  I would like to re-install Safari in an effort to clear up the problem I can not resolve.

    My Safari is no longer working with many sites.  However Chrome and Firefox work fine.  I would like to re-install Safari in an effort to clear up the problem I can not resolve.

    1. From the Safari menu bar, select
              Safari ▹ Preferences... ▹ Extensions
    Turn all extensions OFF and test. If the problem is resolved, turn extensions back ON and then disable them one or a few at a time until you find the culprit.
    2. Select
              Safari ▹ Preferences... ▹ Privacy ▹ Remove All Website Data...
    and confirm. Test.
    3. If the above steps don't resolve the problem, please describe it in more detail.

  • Flash player will not work on my computer, would love advice

    I have windows vista.  When I visit a web page that requires flash, it instructs me to download it (even though I'm sure I have it ialready...).  I do so, it says it has downloaded successfully but I still cannot view the website.  I have uninstalled my current version of flash and reinstalled the latest version numerous times.  It even shows up in my list of programs.  But each time I visit a site that uses it, it tells me I need flash to view it.  Very frustrating.  And suggestions would be appreciated.  Thanks!

    This was very helpful - thank you.  I unchecked "active x filtering" and it seems to be working, under tools in IE.  a simple solution, that may have taken me days to figure out myself!  Hopefully it continues to work from thiis point forward.  Thanks!
    Date: Tue, 16 Apr 2013 12:42:26 -0700
    From: [email protected]
    To: [email protected]
    Subject: Flash player will not work on my computer, would love advice
        Re: Flash player will not work on my computer, would love advice
        created by Chris Campbell in Installing Flash Player - View the full discussion
    Do you see an animation and version number when you visit the Flash Player Version page? If you are using Internet Explorer, please verify that the following two FAQs check out. Enabling Flash Player in Internet Explorer ActiveX Filtering in Internet Explorer
         Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5240948#5240948
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5240948#5240948
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5240948#5240948. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Installing Flash Player by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

Maybe you are looking for

  • Why can't I purchase on the app store?

    I have an early 2008 Macbook Pro that I had purchased the Snow Leopard for through the app store. I just paid the 20.00 bucks and downloaded it without any issues. I have now given the computer to my brother and in order to have all of my stuff erase

  • ITunes quits unexpectedly and will not open. The coloured disc just spins. Is there a solution?

    I tunes will not respond to my request for access. I get a message which says that I Tunes closed unexpectedly. I there a solution?

  • Can you tell me what is the music app in the iPad TV advert love?

    hi, there is a music app in the TV advert love in the scene where there are musicians and an electric guitar connected to the iPad. the app seems to have something like a rack of music equipment in different colours. i am uncertain as to the name of

  • Odd display problems

    I run two 19" CRT monitors off my G4 QS...have for years with no problems. This morning, I arrived in my office, computer running with both monitors displaying fine, and, without touching anything, the left one went dark. I thought I might have jostl

  • Block in safari

    is there any way to block a user from going to certain sites via safari? my brother keeps playing games... i don't want him to.