JTable Cell grays out when I click the cell below (JList editor & renderer)

Click on any cell, then click on the cell immediately below.. and the first cell u clicked on goes gray... After repaints and stuff, it stills stays gray
* TimetableCellGui.java
* Created on April 12, 2007, 7:21 PM
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
package timetable.gui;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.util.ArrayList;
import java.util.EventObject;
import javax.swing.DefaultListModel;
import javax.swing.JList;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.event.CellEditorListener;
import javax.swing.table.TableCellEditor;
import javax.swing.table.TableCellRenderer;
* @author jay
public class TimetableCellGui extends JList implements TableCellRenderer, TableCellEditor {
     * Creates a new instance of TimetableCellGui
    public TimetableCellGui() {
        this.setFont(new Font("Nice",Font.PLAIN,10));
        this.setForeground(new Color(150,150,250));
    private static String courseFilter = "";
    private static String roomFilter = "";
    private static boolean filterCourse = false;
    private static boolean filterRoom = false;
    public static String getCourseFilter() {
        return courseFilter;
    public static String getRoomFilter() {
        return roomFilter;
    public static boolean isFilterCourse() {
        return filterCourse;
    public static boolean isFilterRoom() {
        return filterRoom;
    public static void setCourseFilter(String c) {
        courseFilter = c;
    public static void setFilterCourse(boolean f) {
        filterCourse = f;
    public static void setFilterRoom(boolean filter) {
        filterRoom = filter;
    public static void setRoomFilter(String r) {
        roomFilter = r;
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
        if(value == null) {
            return null;
        } else {
            DefaultListModel model = new DefaultListModel();
            String addition = "some addition";
         model.add(addition);          
            model.add(addition);                
            this.setModel(model);
            return new JScrollPane(this);
    public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column) {
        if(value == null) {
            return null;
        } else {
            DefaultListModel model = new DefaultListModel();
            String addition = "some addition";
         model.add(addition);                          
            this.setModel(model);
            return new JScrollPane(this);
    public Object getCellEditorValue() {
        return "helllo";
    public boolean isCellEditable(EventObject anEvent) {
        return true;
    public boolean shouldSelectCell(EventObject anEvent) {
        return true;
    public boolean stopCellEditing() {
        return true;
    public void cancelCellEditing() {
        super.clearSelection();
    public void addCellEditorListener(CellEditorListener l) {
    public void removeCellEditorListener(CellEditorListener l) {
}

I'm doing up a timetable. And so far, I've found that is the best way to display it. However if you can think of a better way, I'm willing to listen, but if u havn't gotten a better suggestion... Plz try and help me tweak this one to work... Because I've done quite a bit of work on this one so far

Similar Messages

  • Why is the "open with" option always grayed out when I click on a file link?

    For example, when accessing an email account with firefox and I click on an .mp3 attachment the "open with" choice is always grayed out. This issue is not exclusive to email attachments rather all file links that I click on any site give me the same result. I am using MAC OS X Mavericks.
    How can I restore the "open with" selection?
    Thanks for your time,
    Chris Woods

    You can try rename (or delete) the mimeTypes.rdf file in the Firefox profile folder to reset all file actions.
    *http://kb.mozillazine.org/mimeTypes.rdf
    *http://kb.mozillazine.org/File_types_and_download_actions#Resetting_download_actions
    You can use this button to go to the currently used Firefox profile folder:
    *Help > Troubleshooting Information > Profile Director: Show Folder (Linux: Open Director; Mac: Show in Finder)

  • Disk Utility: First Aid: "Repair Disk" grayed out when i select the HD

    I'm getting the flashing question mark folder icon at startup and my Mac never does start. I'm trying to run through the repair suggestions on this forum and on the support pages but I can't do much of anything with the disk utility. (I've done the reset PRAM step and I've tried reselecting a startup volume both with the startup manager --HD wasn't shown as an option-- and by holding down "X" on startup... neither helped.)
    Under first aid, verify disk permissions, i get the "no valid packages" error message. But "Verify Disk Permissions" is the only button available to me when I select my internal hard disk. The support pages say to "Repair Disk" but I can't select that option.
    I've tried to reinstall the OSX from the CD, but when the installer asks me to select a destination volume, nothing is available to select.
    I am running version 10.4.something at least. My CD is the one that came with the computer a couple of years ago. I have one of the early Intel Macbooks.
    I have an appointment at the Genius Bar after work tonight but I'd love it if I could fix this baby sooner.
    Am I hosed?

    OK- Try a Single User boot- hold command +s while starting, and try and repair with fsck.
    -Startup in Single User mode.
    -At the command-line prompt, type */sbin/fsck -fy*. Press Return.
    fsck will go through five "phases" and then return information about your disk's use and fragmentation. Once it finishes, it'll display this message if no issue is found:
    *The volume (nameofvolume) appears to be OK*
    -If fsck found issues and has altered, repaired, or fixed anything, it will display this message:
    *FILE SYSTEM WAS MODIFIED*
    Important: If this message appears, repeat the fsck command again, until fsck tells you that your volume appears to be OK (first-pass repairs may uncover additional issues, so this is a normal thing to do).
    -When fsck reports that your volume is OK, type *reboot* at the prompt and then press Return.
    -Your computer should start up normally and allow you to log in.
    Resolve startup issues and perform disk maintenance with Disk Utility and fsck

  • I visit the app store to refresh my CAD WS. However, when i click the button below the brand to refresh, the ID certification turns up and it doesn't show my ID but other's. How can I change this ID into mine?

    I have passed the ID certification in app store in the settings though . I just can't download the programme as the ID certification doesn't show my ID.

    Nothing can be better if you can read Chinese below.
    Ipad一代登入app store的“更新”页面,想要下载程序更新。但是按下“更新”键后弹出的ID登录框都是之前一位用户的ID(例如[email protected]),不能改成现在ID(例如[email protected])。尽管已经尝试在“设置”的“Store”里用[email protected]登录成功了,但是按下“更新”键后弹出的ID登录框总是之前一位用户的ID(例如[email protected]),就是改不过来,请问怎么办?

  • Hi when i open my application folder, all the application is shown in trash folder. when i click the application it says this app is in trash first move it out. and when i try to open through finder go it says this file doesn't exist. can some1 plz help?

    hi when i open my application folder, all the application is shown in trash folder. when i click the application it says this app is in trash first move it out. and when i try to open through finder> go it says this file doesn't exist. can some1 plz help? how can i put all my application through application folder?

    Something really odd is going on. In your first screen shot, I noticed that the Applications folder does not have the proper icon displayed in the side bar. Also, in the title bar it lists it as Applications 08-59-29-909.
    Not sure where it's picking up that odd name, unless it's because it's still truly within the Trash folder.
    Try this. In the Finder > Preferences > General > turn on "Always open folders in a new window". (I have a feeling you have the default setting with this off).
    Now, in Finder > Go > move down and open the Applications Folder from there. Now open the folder where you see all your applications that you show in your screen shot, select all, and move them to this true appliactions folder.
    This is what you should properly seeing (but with different apps listed):
    See how the Applications folder has the icon of the letter A shaped with a pencil, ruler & pen.

  • I can't burn a dvd using any method, Idvd tells me that my super drive is missing, dvd studio pro quits when i click burn and disk utility keeps spitting the disk out when i click burn and enter the disk??? how do i repair my superdrive for imac

    I can't burn a dvd using any method, idvd tells me that my super drive is missing, dvd studio pro quits when i click burn and disk utility keeps spitting the disk out when I click burn and enter the disk??? how do i repair my superdrive for imac, or how do I do whatever I need to do to get it working: I have already tried using a lens cleaning cd and also restored my nvram or something i forget what it was called but i restarted my computer holding down  command+optoion+p+r and still nothing???
    Free solutions are the best, although if I have to pay I will, I would prefer to not have to buy an external burner if possible and already know that is an option so please don't give me that answer... thank you for any help you can give

    Unless your iMac is still covered by AppleCare, get an external DVD burner.
    You can get perfectly good ones from Amazon for less than $40.

  • A word document was emailed to me.  I can open the document without a problem.  Is there a way for me to type on the document.... to fill out the form?  When I click the fields, the virtual keyboard does not appear.

    A word document was emailed to me.  I can open the document without a problem on my iPad 2.   Is there a way for me to type on the document.... to fill out the form?  When I click the fields, the virtual keyboard does not appear.

    If you want to edit a word document then you will need an app on your iPad that supports word so that you can copy them to it via 'open in' e.g. Apple's Pages app or a third-party app such as Documents To Go or QuickOffice HD

  • Should be the bluetoot symbol grayed out when the bluetooth is turned "ON"or it should be highlighted in white like rest of the active symbols are? Please unswer this simple question clearly. Thank you.

    My blutooth symbol on the new i-Pod 2 is grayed out when the option is turned "ON". Shouldn't be highlighted white like the rest of the symbols are?

    when blue tooth is turned off in settings, the symbol does not show at all.  when BT is turned on in settings, but there is no connected device, it will show the symbol gryed out.  When BT is on, and connected to an active device, it will show as bright white.

  • When i click the isInteger button, there is nothing came out!

    not sure if i can post this javascript here, but if anyone who has time to take a look at it and tell me what i did wrong, i will appreciate :)
    when i click the isInteger button, there is nothing came out!
    <html>
    <head>
    <script type="text/javascript">
    function isInteger(val){
         if (isBlank(val)){return false;}
         for(var i=0;i<val.length;i++){
              if(!isDigit(val.charAt(i))){return false;}
         return true;
    </script>
    </head>
    <body>
    <form>
    <INPUT NAME="isInteger" SIZE=15>
    <INPUT TYPE="button" VALUE="isInteger()"
    onClick="alert(isInteger(this.form.isInteger.value))">
    </form>
    </body>
    </html>

    now, it runs :)
    <html>
    <head>
    <script type="text/javascript">
    function isBlank(val){
         if(val==null){return true;}
         for(var i=0;i<val.length;i++) {
              if ((val.charAt(i)!=' ')&&(val.charAt(i)!="\t")&&(val.charAt(i)!="\n")&&(val.charAt(i)!="\r")){return false;}
         return true;
    function isDigit(num) {
         if (num.length>1){return false;}
         var string="1234567890";
         if (string.indexOf(num)!=-1){return true;}
         return false;
    function isInteger(val){
         if (isBlank(val)){
              return false;
         for(var i=0;i<val.length;i++){
              if(!isDigit(val.charAt(i))){
                   return false;
         return true;
    </script>
    </head>
    <body>
    <form>
    <INPUT NAME="isInteger_1" SIZE=15>
    <INPUT TYPE="button" CLASS="button" NAME="isInteger_2" VALUE="isInteger()"
    onClick="alert(isInteger(this.form.isInteger_1.value))">
    </form>
    </body>
    </html>

  • I received a link to fill out a document on this site through email. However, when I click the link, it just directs me to my FormsCentral homepage and there are no documents for me to fill out. How do I find this document or stop myself from just being r

    I received a link to fill out a document on this site through email. However, when I click the link, it just directs me to my FormsCentral homepage and there are no documents for me to fill out. How do I find this document or stop myself from just being redirected to my homepage?

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • Im trying to purchase an iphone 6 but when I click the check out button it says that my cart is empty basically my iPhone 6 disappears off my cart

    Im trying to purchase an iphone 6 but when I click the check out button it says that my cart is empty basically my iPhone 6 disappears off my cart

    I tried powering down and re-starting the iPhone (as suggested at http://support.apple.com/kb/TS1275). This seems to have cleared the "...not connected to the Internet" problem, and iOS 6.1 is now in the process of downloading.
    Thanks very much for your feedback.

  • HT4199 My 4gs iphone has lost wi-fi connectivity.  When I go to "Settings Wi-Fi", I see "Wi-Fi" and the on-off button, but it shows up in light gray.  When I click "Off" to turn on Wi-Fi, nothing happens.  HELP!

    My 4gs iphone has lost wi-fi connectivity.  When I go to "Settings > Wi-Fi", I see "Wi-Fi" and the on-off button, but it shows up in light gray.  When I click "Off" to turn on Wi-Fi, nothing happens.  HELP!

    Try the suggestions here to attempt to solve your problem:http://support.apple.com/kb/ts1559
    If these don't work you may have a hardware problem. If so, contact Apple support or visit an Apple store.

  • Import button remains grayed out when adding existing folder to LR 4

    Greetings.  I'm following the steps in the following link from Adobe:
    http://help.adobe.com/en_US/Lightroom/3.0/Using/WSE828B644-9097-46ab-98A7-E2719BBB6647.htm l
    The final step, after selecting the folder I want to add, is to select Import.  Except, the Import button remains grayed out.  I'm not sure what to do in order to select Import and add the folder I already have.
    Thanks,
    Mike H.

    Thank you for the information.  Yes, that seems to make sense based on what I've discovered using LR 4.  Still trying to come up to speed.  Appreciate everyone's help with their tips and insight.
    Date: Tue, 24 Apr 2012 01:44:25 -0600
    From: [email protected]
    To: [email protected]
    Subject: Import button remains grayed out when adding existing folder to LR 4
        Re: Import button remains grayed out when adding existing folder to LR 4
        created by LRuser42 in Photoshop Lightroom - View the full discussion
    Folders per se cannot be imported - only pictures (or movies) in a folder can. So, you have to select a folder containing at least one picture or movie (all pictures and movies found are automatically selected when the import dialog opens). This is probably not the case for the folder you want to add, so "no photos found" is displayed in the dialog center and the "Import" button is greyed out.
         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/4356518#4356518
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4356518#4356518. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Photoshop Lightroom by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • How to gray out certain fields on the selection screen based on the radio b

    HI All,
      I have an ALV report. On the selection screen I have 2 radio buttons ..for eg..A and B.
    When radio button A(its on by default) is on..certain fields not relevant to this should be grayed out. Similarly when radio button B is on, certain fields should be grayed out.
    I did the AT SELECTION SCREEN OUTPUT and also did the
    LOOP AT SCREEN....ENDLOOP logic. The logic works but when I click the radio button B...the screen fields automatically does not gray out. I have to press ENTER and then its grays out.
    I know a USER_COMMAND needs to be attached.
    Can anyone give me a step by step details of how to do this. I truly appreciate it. if a screen painter thing is required..please give me the tcode and step by step detail to do this.
    Thanks

    Try this one too:
    REPORT ztest.
    TABLES: mara,
            bkpf.
    CONSTANTS:
                  c_pos(3) TYPE c VALUE 'POS',
                  c_acc(3) TYPE c VALUE 'ACC',
                  c_all(3) TYPE c VALUE 'ALL',
                  c_x TYPE c VALUE 'X'.
    The Selection Screen Definition
    SELECTION-SCREEN BEGIN OF BLOCK b_0 WITH FRAME TITLE text-000.
    SELECT-OPTIONS: s_mara FOR mara-matnr.
    SELECTION-SCREEN END OF BLOCK b_0.
    SELECTION-SCREEN BEGIN OF BLOCK b_1 WITH FRAME TITLE text-037.
    PARAMETER: rb_all RADIOBUTTON GROUP rb1 USER-COMMAND rad default 'X',
               rb_acc RADIOBUTTON GROUP rb1.
    SELECTION-SCREEN END OF BLOCK b_1.
    SELECTION-SCREEN BEGIN OF BLOCK b_2 WITH FRAME TITLE text-011. "Acct
    SELECT-OPTIONS:   s_blrtc1 FOR bkpf-blart MODIF ID acc,
                      s_blrti1 FOR bkpf-blart MODIF ID acc.
    SELECTION-SCREEN END OF BLOCK b_2.
    SELECTION-SCREEN BEGIN OF BLOCK b_3 WITH FRAME TITLE text-011. "Acct
    SELECT-OPTIONS:   s_blrtc2 FOR bkpf-blart MODIF ID all,
                      s_blrti2 FOR bkpf-blart MODIF ID all,
                      s_blrtv2 FOR bkpf-blart MODIF ID all.
    SELECTION-SCREEN END OF BLOCK b_3.
    AT SELECTION-SCREEN OUTPUT
    AT SELECTION-SCREEN OUTPUT.
      PERFORM f0200_screenfield_hide_logic.
    initialization.
      PERFORM f0200_screenfield_hide_logic.
          FORM f0200_screenfield_hide_logic                             *
    FORM f0200_screenfield_hide_logic.
      LOOP AT SCREEN.
        IF rb_acc = c_x.
          IF screen-group1 = c_all.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
        IF rb_all = c_x.
          IF screen-group1 = c_acc.
            screen-active = 0.
          ELSE.
            screen-active = 1.
          ENDIF.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    ENDFORM.                    " F0200_SCREENFIELD_HIDE_LOGIC

  • PhotoShop Filters grayed out when using Aperture

    I sent some photos from Aperture to PS to add some frames. Used the Texture filter and all went well for 3 photos. Then it quit working. Some of the filters are grayed out. I tried the same thing from Lightroom and it was the same. All worked fine with iPhoto. If I export the photos to another folder, desk top etc., then open them in PS, all the filters are working. But for some reason some of the filters will not work when opening a photo from Aperture to PS.
    Any suggestion why some filters would quit when they worked before?
    Thanks, Allie

    That's because you have ACR set to 8 bit and you have Aperture set to 16 bit. (Clicking the text that looks like a web link at the bottom of the ACR window is how you change it)
    You could change Aperture's external editor preferences to send 8 bit instead of 16 bit.
    Or
    Once in Photoshop you could change it: Image>> Mode >> 8 Bit as I think Steve was suggesting.
    DLS
    Message was edited by: MacDLS

Maybe you are looking for