Various cell renders for cells (not for columns only) in JTable

Hello, I need to create a property list with some various values (strings, colors, booleans) just like in Netbeans do. I will use JTable component, but I found I cannot have various cell editors for cells. In JTable cell editors can be only changed for COLUMNS. What sould I do?
ps - is there any JPropertyPanel avaiable for free on the web?

I had a similar problem recently whilst working on a Swing GUI designer (you're not doing the same are you? ;o). Presuming you already know how to create TableCellEditors you can use a very simple hack to achieve your goal.
Either extend the JTable class and override the getCellEditor(int row, int column) method, or override the same method when constructing the JTable (this is what I did). You would need to write something like:
JTable myTable = new JTable(){
    public TableCellEditor getCellEditor(int row, int column) {
        TableModel model = getModel();
        Object data = model.getValueAt(row, column);
        return getDefaultEditor(data.getClass());
}The getCellEditor method is called by JTable whenever a cell is to edited, normally it would check to see if the TableColumn has an editor associated with it and return that, if there wasn't one it would get the class of data for the column and return the default editor for that type of class, which is similar to what it does here except it returns the default editor for the class of an individual item of datum.
Now all you need to do is associate your TableCellEditors with the class types they are to edit with the setDefaultEditor(Class c, TableCellEditor editor) method of JTable. If, for instance, you had an editor for the Color class you would have a line something like:
myTable.setDefaultEditor(Color.class, new ColorCellEditor());Good luck, and I hope this helps.
MS.

Similar Messages

  • Error (-45054) for WINDOWS not for a mac

    For the past three days i have been trying to download app updates via the iTunes WINDOWS software program without success due to the error -45054. I have done many a search but can only find answers on how to fix the problem on mac computers. I am running windows 8 (yes i know it ***** you don't have to tell me)
    There are a total of two users on the computer in question. However the error only occurs in the account of one of the two users. User #1 has no problems whatsoever and is a administrator. User #2, also listed as a administrator always gets the -45054 error.
    Files are all set as shared with everyone with full control.
    i have tried to remove iTunes and reinstall but still no help. Any suggestions are appreciated as long as they are for WINDOWS not for mac

    I tried submitting this same problem as a feature request and/or bug report.
    Unfortunately, and somewhat disconcertingly, the Captivate Bug Report form also doesn't work. No matter how thoroughly I entered my request, I got these error messages:
    The following error(s) must be corrected before this form can be completed:
    Please enter your name
    Please enter your E-mail address
    Please select if it is feature request or the bug report.
    Please select a product
    Please enter the issue description

  • Infotype only for pa40, not for pa20/30 ???

    Hello,
    How to set an infotype to be available only for pa40, not for pa20/pa30?
    J can programm it in PBO and check the transaction code, but I look for another solution, maybe in spro.
    Regards,
    Piotr

    Hi.
    I have got a doubt after reading ur question.
    PA40 is for Personnel Actions.
    PA30 is to maintain master data.
    PA20 is to display master data.
    so is it possible to set infotypes only for PA 40, and not for PA30/20

  • I want to be the only one who can access my profile, so how to create passwords for profiles (NOT for websites) ?

    I want to be the only one who can access my profile, so how to create passwords for profiles (NOT for websites) ?
    thanks

    Maybe use the portable Firefox version on a USB stick if you want to prevent access to your profile.<br />
    Solutions that use an extension can easily be bypassed by starting in [[Safe mode]].<br />
    Otherwise you need to locate the Firefox profile folder on an encrypted drive.
    See http://portableapps.com/apps/internet/browsers/portable_firefox

  • Set file filters in flex for save, not for browse

    How can i set file filters in flex for save, not for browse?
    Right now i am using filereferce class for saving purpose but i could
    not able to set filter. We can easily do it for browse.

    You can try to delete [http://kb.mozillazine.org/mimeTypes.rdf mimeTypes.rdf] in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder]
    * http://kb.mozillazine.org/File_types_and_download_actions#Resetting_download_actions
    Create a new profile as a test to check if your current profile is causing the problems.
    See:
    * [https://support.mozilla.com/kb/Basic+Troubleshooting#w_8-make-a-new-profile Basic Troubleshooting: Make a new profile]
    There may be extensions and plugins installed by default in a new profile, so check that in "Tools > Add-ons > Extensions & Plugins" in case there are still problems.
    If that new profile works then you can transfer some files from the old profile to that new profile (be careful not to copy corrupted files)
    See:
    * http://kb.mozillazine.org/Transferring_data_to_a_new_profile_-_Firefox

  • Looking for patch note for 3.1

    anyone has the link for patch note for v3.01?

    http://support.apple.com/kb/HT3754
    or
    http://www.pcworld.com/article/169432/applepatches_iphone_sms_vulnerability.html?tk=relnews
    Message was edited by: deggie

  • $LS_COLORS stopped working (for user, not for root)

    Good day.
    Some time ago,  "ls" stopped paying attention to my color settings when coloring output for my user, while still working for root. For both root and my user, I set $LS_COLORS through ~/.bashrc as "eval $(dircolors -b)" but while this works fine for root, it at some point stopped working for my user, simply since the "eval" doesn't seem to work anymore. That is, what could be the reason for the below behavior?
    (note: I also have colored ls output without $LS_COLORS; just not the colors that I want, and which root does have).
    ===
    [rene@e600 ~]$ echo $LS_COLORS
    [rene@e600 ~]$ dircolors -b
    LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:';
    export LS_COLORS
    [rene@e600 ~]$ eval $(dircolors -b)
    [rene@e600 ~]$ echo $LS_COLORS
    [rene@e600 ~]$
    ===
    bash is 4.2.045-5 (coreutils is 8.21-2)
    Regards,
    Rene

    I happens to have the same problem of yours after logging in to Gnome but i didn't test for root.
    I've followed what comment #40 says at
    https://bugs.launchpad.net/ubuntu/+sour … bug/549727 and the problem
    seems to gone.
    try removing ~/.gconf/desktop/gnome/peripherals/touchpad ?

  • How to create requirement for BOM, not for its components?

    Dear gurus,
    I have never worked in PS module before. Now I have the following task:
    There is Project, Network and WBS. I inserted material for operation in WBS and exploded the material.
    Now the system must create requirement for this material but NOT for components of BOM. How can I configure the system?
    P.S. We don't use MRP and we can't change Material Master Data.
    Edited by: Azat Fayzullin on Dec 8, 2009 12:44 PM

    Have you read SAP help on PS
    also check this forum for similar posts
    If you have never worked on PS module I am not sure if you will be able to configure the system
    please attend some courses in PS from your local SAP academy course names are PLM200, PLM210, PLM220, PLM230, PLM240
    for your specific requirements I would recommend PLM200 and PLM220

  • Users group for View not for publish

    Hi guys,
    Does anybody can tell me how can I creat users group for view
    and not for publication?
    It's something like to create Contribute roles, but is not
    related with the permission levels to publish, but with the
    visualization permissions for exclusivy content, for ex.:
    Home (open for all users)-------- IT Dept--------Directory
    Dept ---------Support Dept
    - Johny - Johny - Joseph - Isaac
    - Jack - Jack - JJ - Jason
    - Rose - Rose - Robert
    - Joseph - Lisa
    - JJ
    - Isaac
    - Jason
    - Robert
    - Lisa
    Please somebody help me, It's very, very important!!!
    Thanks in advance for who can help me.
    San.

    Sandra Bercke wrote:
    > Hi guys,
    > Does anybody can tell me how can I creat users group for
    view and not for
    > publication?
    > It's something like to create Contribute roles, but is
    not related with the
    > permission levels to publish, but with the visualization
    permissions for
    > exclusivy content, for ex.:
    >
    > Home (open for all users)-------- IT
    Dept--------Directory Dept
    > ---------Support Dept
    > - Johny - Johny - Joseph
    > - Isaac
    > - Jack - Jack - JJ
    > - Jason
    > - Rose - Rose
    > - Robert
    > - Joseph
    > - Lisa
    > - JJ
    > - Isaac
    > - Jason
    > - Robert
    > - Lisa
    >
    > Please somebody help me, It's very, very important!!!
    >
    > Thanks in advance for who can help me.
    >
    > San.
    >
    You cannot restrict on the users to view a particular folder
    (say IT
    dept) using contribute. Infact there is a setting in IIS
    Webserver which
    allows you to set an Authentication mechanism where users
    when browsed
    to any site on your webserver will be prompted for username
    and password.
    But you might want to try something like this.. not sure if
    this will
    help you...
    1. Create 4 connections in contribute
    a) first connection to "Open for all users" directory on
    your webserver.
    b) second connection to "IT Department" directory on your
    webserver.
    c) third connection to "Directory dept"... etc
    2. This way you can administer 4 sites and send connection
    keys to them
    accordingly...
    Hope this helps.

  • Ready for Sale / Not for Sale

    My book has been in ready for sale status on iTunes Connect for a month now—but not for sale in the iBookstore.
    I've sent 5 queries via iTunes Connect support as to why my book isn't in the iBookstore with no acknowledgement or response.
    Any suggestions are appreciated.

    That's the problem. There is no way that I can find other than through iTunes Connect.
    Thanks anyway.

  • Time Capsule just for backups, not for wifi.

    I used to use my Time Capsule for both backups and wifi but constantly had issues, so I just disconnected it in favor of a simple Airport Express. No issues since switching, but now I have this Time Capsule just sitting here and don't do automatic backups any longer...I would like to use solely for back ups, I don't need these backups to be wireless, just for use with Time Machine. I can't find the answer by google, any suggestions?

    I am trying to do the same thing but I am having an issue.
    I, too, was having issues with using the Time Capsule (new one-2T) as a router and for backup (the Internet was dropping all the time). So I bought a separate router (ASUS RT-N56U) and have that plugged into my Motorola modem. The Time Capsule I have plugged into the router.
    Airport Utility and I have become best friends as of late with all the problems I am having and my TC keeps getting lost-AU says that it was part of my network and now can't be found. Strangely, if I go to Open Network Settings from the menu bar and select Assist Me--->Diagnostics--->Select my network--->Continue and when the window pops up about Always Allow Keychain, I click on Always Allow. And that seems to correct the problem with my TC not being found/part of the network. This happens all the time lately.... Ever since I got the new router.
    So if you or anyone have any insight into what is going on.... I will try it! Thanks for the help, Judy

  • GetElementById from parent works for Firefox not  for IE

    I am trying to access an element in my Edge Animate animation (which is a menu bar) from the parent document.  The element has an onClick event which is triggered depending on the #bookmark in the URL of the parent web page.  My code works perfectly in Firefox but does not work in Internet Explorer(10).  IE is unable to see any elements within the 'Stage' div whereas Firefox can.
    This is the JavaScript code on my parent page: -
    <script language='javascript'>
          var thisPage = window.location.pathname;
          var fullurl = document.URL;
          var xxx = fullurl.substring(fullurl.indexOf('#'));
          var pageString = xxx.replace("#", "");
          pageString = pageString.replace("http://www.mydomain.com/portfolio/photography.html", "");
          if (pageString == "corporate") {
                window.onload = function()  { 
                var iframe = document.getElementById('U10511_animation');
                var innerDoc = (iframe.contentDocument) ? iframe.contentDocument : iframe.contentWindow.document;
                var corporateRectangle = innerDoc.getElementById('Stage_Corporate_Rectangle');
                corporateRectangle.click();
    </script>
    The above code will select the Corporate tab in the menu when viewed in Firefox but not IE when the URL has the suffix #corporate.
    When I insert an 'alert' for the variable 'corporateRectangle' in Firefox it returns [HTMLObj] and in IE it returns 'null'.
    Any ideas anyone?  Thanks.

    The issue was that the menu animation has a preloader.  Firefox ignores the preloader whereas IE treats the preloader as onLoad being complete.  Therefore the attempt to access the element ID is null as it hasn't been loaded yet.
    I decided to approach the problem from a different tack and read my bookmark from within the animation.  This turned out to be a very simple solution once I figured out that I had to put the code in the first frame of the animation NOT in creationComplete or compositionReady.
    This was the code: -
        var bookmark = parent.window.location.hash;
        bookmark = bookmark.replace("#", "");
        if (bookmark == "corporate") {
         sym.play("corp");
    yes, as simple as that.

  • [CS3][JS] page.place(...) works for pdf, not for snippet

    Hi all,
    I'm having some problems with the page.place(...) command on InDesign CS3 Server.
    When I try to place a PDF on a page, it works perfectly. I can see the PDF on the document.
    But when try to place a snippet file, it gives me a very strange result.
    There is a frame on the document where the snippet should be placed, but it doesn't contain anything. You also cannot see it unless you select it.
    I can move the frame around, but not resize it.
    But when I copy and paste this frame, the newly copied frame does contain the contents from my snippet.
    When I try this on my desktop version it works correct, but not on the server.
    Here's the code I use:
    //set measurement to pt, just to be sure
    myDoc.viewPreferences.horizontalMeasurementUnits = MeasurementUnits.POINTS;
    myDoc.viewPreferences.verticalMeasurementUnits = MeasurementUnits.POINTS;
    //place the snippet on the last page
    myDoc.pages.lastItem().place(new File("c:/mySnippet.inds"), [170, 400]);
    I managed to solve this by using the PDF place instead of snippet, but at a later stage I will have to use snippets, so it would be great to know what I'm doing wrong.
    Regards,
    Dany

    Hmm it seems that the snippet is placed on the first page, but for some reason, the coordinates are so wrong that it ends up on one of the following pages. that's wy I cannot select it.
    I attached the document, it's hard to explain.
    You can see two pages, all seem empty at first sight.
    When you click on the first page and do a ctrl-a to select all items, you can see that there is an item selected on the second page.
    Remarkable is that if I use the same code to place a pdf, the pdf is placed at the correct position on the second page.
    Is there something wrong with the coordinates when placing snippets, or am I doing something wrong?
    Dany
    Edit: I can't seem to reproduce this problem with a blank indesign file, which will probably make it hard for anyone to find the problem.
    Must be something else in the complete script that is causing this.

  • Works for webrowsing, not for gaming... weird connection problems.

    So back in November my wife and I were planning on moving but unfortunately the job didn't pan out and we ended up staying where we are now. I had canceled my Comcast cable internet starting Dec1st so I wouldn't get billed for the 12 days we intended to be in the state. At the time, I had my cable modem plugged into my Airport Extreme basestation (about 2 years old, but still the wireless G model) which serviced my iMac G4, iBook, XBox and Nintendo DS with an excellent connection pretty much all the time.
    I recently got Comcast back again since we'll be staying where we're at for a couple more months at least, but now my network is acting funny. While plugged directly into the cable modem, my computers and XBox function perfectly. But when I attempted to set up my wireless connection again, it didn't work quite the same way again. My iMac and iBook can connect for webbrowsing and chatting on AIM/MSN although I occasionally get drops (never really happened before). My XBox won't connect wirelessly at ALL anymore. My DS will connect, but instead of getting normal "slow internet connection" lag, I get pauses. For instance, I'd play smoothly for a few seconds, and then the game would freeze, then play pretty smoothly again, then freeze again. This game forces a split host, so both players get the same lag to attempt to make the game as even as possible. But my friends who play don't have the same problem facing each other, only against me.
    I've watched the LED's on the front of my basestation AND my cable modem while surfing the web, using AIM and (attempting) to play my DS. The center and right lights stay active the entire time, but the left light is almost always off. It merely flashes for a few seconds here and there and then cuts out. In fact, during the times my DS game worked smoothly, it was flashing, when it stopped flashing the game froze. Also, on the cable modem, MOST of the time while connected to my basestation the SEND light is not active, but all the others are. Again, it flashes for a few seconds here and there and then cuts out.
    This modem is a different one than I had before when I had comcast. They updated the modems used in this area, so my guess so far has been that somehow the Airport basestation doesn't query the modem enough to keep the connection active. That would also explain why when I haven't been using the internet and then start to, it takes 2 or 3 tries to get a page to load. Once that happens things work pretty smoothly, albiet slower than it did the first time I had comcast/AE network setup. Also, occasionally I get an error message when trying to join the network (right after boot-up or after an error or drop) that says there was an error joining the network, and then I have to wait a little while before my iMac will even see the network again.
    Does anyone have any suggestions for getting my basestation to work for my gaming systems? Or to get the network to be more stable for websurfing/chatting. I never changed any settings on my basestation from the time I had it before, in fact, it never even moved. I don't want to go buy another wireless router if it's a communication problem that can be fixed some other way. Someone please help me out. Thanks a bunch~!
    Old Modem Model: Motorola Surfboard - SB5120
    http://broadband.motorola.com/consumers/products/sb5120/
    Current Modem Model: Ambit - U10C018
    http://www.ambitbroadband.com/broadband/U10C018.php
    Airport Basestation Firmware: v5.4

    First welcome to the discussions.
    You mention a couple of times when you had Comcast.
    If you changed service to DSL it will be slower by 1/2.
    Unless I am mistaken the left light is power and the middle is ethernet and the right is activity.
    It sounds like you may be loosing your connection intermident. I would not chang e any settings at all on your computers and leave evrything plugged in.
    I would however check and make sure that all your cables are in tight. then I would do a complete system reset.
    This method is recommended by all the Router Manufactures with a little different twist added by me.
    Pull the Power Adapter from your ISP's Modem. and do the same with your Router.
    Wait for at least 5 minutes and plug in the Power Adapter to the MODEM First and you have to wait until you get all the lights normally 3 after that plug in the power adapter to your ROUTER and again you have to wait until it reacquires the signal and lights,I would restart your computer and give it a whirl.
    It can't hurt to unplug every thing that you have plugged in Printer, scanner x box anything that could affect it untill you have a good signal again and after you are good then you can plug everything back in.
    Cheers Don

  • ActiveSync only works for Contacts, not for Calendars and Email

    So it seems that the ActiveSync is only working partially for me... When syncing with our company's OWA, my Contacts sync fine (though some create duplicates). However, the Calendar doesn’t sync at all, and the Email only syncs the folder structure, but none of the emails in them. When I attempt to sync the individual folders it gives me the same error message - “connection to the server failed”. This is a bit puzzling, as it is able to connect to the server just fine to get the contacts and the email folders.
    I have already talked to the resident geniuses at the apple store and the exchange admin people - all are clueless... And did I mention, we don't have IT dept. to fix this... Please let me know if anyone is experiencing a similar problem or can suggest a way to fix it...
    Many thanks.

    I am also having this problem. I was on 2.0.1 with the original iphone and had activesync working just fine. Contacts, calendars and email were all working.
    On Friday I made the critical mistake of deciding to upgrade to 2.0.2. My phone was a brick for a little more than a day. I finally seemed to figure out the magical incantations required to get it restored and syncing with itunes (it was in a loop of only wanting to restore my phone).
    Since getting it back into a relatively normal mode of operating on 2.0.2 I have not been able to get push email via ActiveSync working (it was working fine, no changes on the Exchange side of things). The only thing that changed was my upgrading to 2.0.2.
    Since then I am back to the pre-2.0 email capabilities (I can create a seperate account on the phone and make imap work, but I don't get push with that).
    I sure hope Apple is reading this and taking steps to correct it. I have no idea how to restore my phone to the way it was before I made the mistake of upgrading to 2.0.2 I should just have waited for 2.1

Maybe you are looking for

  • Is it possible to customize aspect ratio?

    I have a video of scrolling text that I want to project across the top of the back wall of a theater for a performance, like supertitles (or surtitles) at the opera.  Very wide, very short, like a row of text.  so the aspect ration needs to be someth

  • The update "Mac OS X Update" can't be saved.  ERROR

    Hi, I have been searching these forums for an answer. Today I had a pop up informing me that update are available. Mac OX X Update 10.5.7.286 MB The 10.5.7 Update is recommended for all users running Mac OS X Leopard and includes general operating sy

  • My messenger will not rotate views.  Other apps are ok.

    About a week ago auto rotate function quit working in Messenger.  Still works in other apps.  Anyone else with this problem?

  • Database slow; Log file sync shown in AWR

    Our database becomes slow occasionally and when i looked at AWR report it shows 'log file sync' quite often. Any idea why this is happening?

  • Pavilion dv4 webcam not detected

    I have the Pavilion dv4-1454ca notebook and I am having problems with the computer identifying the webcam. I changed the OS to Windows Vista 64-bit and ever since then my webcam doesn't work. I have followed all the steps in fixing webcam after chang