JFileChooser - Selection Highlight lost on Focus Lost

I have a form with a JFileChooser, a JButton and a JTree. When I select files and that I select another object, the JFileChooser remove the highlight of my selected files (the object still have the list of selected files). So when I reselect the JFileChooser, its look like nothing was selected.
Is there a setting to keep highlight when the focus is lost?
Thanks

U mean these:
import java.applet.*;
import java.awt.*;
public class Cyclus extends Applet {
public void init() {
System.out.println("init");
public void start() {
System.out.println("start");
public void update(Graphics g) {
System.out.println("update");
public void paint(Graphics g) {
System.out.println("paint");
public void stop() {
System.out.println("stop");
public void destroy() {
System.out.println("destroy");
the problem is that these methods are first called when the event has happent. I need it WHEN it happens....

Similar Messages

  • Selecting/highlighting a node in Flex Tree using HierarchicalCollectionView as DataProvider

    Hi,
    I am using GroupingCollection2 as the dataprovider for HierarchicalCollectionView. The GroupingCollection2 takes its data from an ArrayCollection. And finally I have a Tree whose dataprovider is the HierarchicalCollectionView . I want to acheive 2 things:
    1) I want to programatically select/highlight a node in this tree. Using expandItem and passing the Object from the arraycollection is not working.
    2) Refresh the tree if there is a change in the arrayCollection.
    For the second task, I have a Java Layer that gives me the ArrayCollection  (dp for GroupingCollection2) when I fire a CairngormEvent. But the problem is that every node in the tree is duplicated. I can clearly see that say there are 8 items in the array collection but still the tree shows 16 items ( Each item duplicated as the node in the tree.)
    I have been trying to figure this out for many days now without any luck. Any sort of suggestion would be appreciated.
    Thank u in advance.

    I got the refreshing of the tree part by myself. One needs to call the refresh method on the GroupingCollection2 and HierarchicalCollectionView objects when the arraycollection has just arrived from the database.
    But I still havent been able to figure out how to highlight or open a tree node programatically. I am repeating that using (calling / setting) tree.expandItem() and tree.openItems is not helping me. Plz somebody help.

  • Table rows can't be selected / highlighted

    Hi All,
    I would like to know how table rows in BSP can be selected / highlighted. I was working with enhancement in standard application ERP_IT, but I need table rows to be selected to put some validation. Does anyone have an idea how to do this?
    Regards,
    Louie

    Hi Louie,
    You should pass the following parameters to the TableView.
    selectionMode = "MULTISELECT"
    displayMode    = ' '
    Answered!

  • How do I control the selection highlighting colors assigned to Layers?

    When new layers are created in the Layers panel, they are set to a default selection highlighting color. The color for each new layer changes, sequencing through a list of color options. For my personal use, whether or not it's the lighting in my office and/or the artwork I'm working with, I find about 75% of the color options to be unusable. In fact, the only color definition that works consistently for me is 'Green' (the third option from the top of the list). I work with many layers on every project and I find myself changing every layer to Green manually. Is there an option to set the default highlighting color for every new layer to a single color rather than cycling through the list? I have looked through all the options I could find throughout Illustrator without seeing such.

    Create all your layers, select the first layer, hold down shift, select the last layer, then doubleclick to change all layers at one.
    Or create a template with your layers/names/colors that you want them, and save as to a .ait template format.

  • HT2486 How do I remove the grey "contact" selection highlight?  This contact always appears as the email address for the group I want to send to.

    How do I remove the grey "contact" selection highlight?  This contact always appears as the email address for the address book group I want to send to.

    The group is "undisclosed" there are 6 contacts in the group. The contacts are listed in 2nd column entitled "name", one of these contacts remains highlighted or selected in grey. I can't remove the grey selection of the contact.   When you select the "undisclosed" group as the "to" address the contact highlighted in grey appears in the email address box.  The group name should appear in the email box, but it doesn't.  This began to happen after I upgraded to IOS 10.6.8.  However I'm not sure that has anything to do with the problem?  I do not have "show all member addresses selected."  Your help is appreciated.

  • Shortcut to select highlights

    Unless I don't remember correctly but I thought the shortcut key to select highlights is Ctrl+Alt+Tilde. Why is this not working in Photoshop CS4? This is frustrating.

    Then you've done something to change the defaults.
    I don't know whether you have been editing your keyboard shortcuts or you have corruption, but you can change that key assignment by choosing Edit - Keyboard Shortcuts... then expanding the Select section.
    -Noel

  • How can I restore the text selection highlight colour to the default black colour in indesign CC ?

    How can I restore the text selection highlight colour to the default black colour in indesign CC ?

    Manish Shama, thanks for your speedy response. I was able to get into my MAC settings and change the background from the black to whatever color I like, so that helps (THANKS!). But the real issue is that the selected text does not turn white (even though that's what's specified in my MAC settings), it remains black. I really want to have the selection reverse out as it always has for years and years going all the way back to PageMaker Any ideas?

  • Query syntax highlighting lost when using national characters.

    Theres a minor bug with syntax highlighting. If I have a query in sqldeveloper like -
    select * from table
    where name = N'fred'
    and ... ... ...
    All the coloured syntax highlighting is lost from the N' onwards.
    Edited by: [email protected] on 24-Feb-2009 03:18

    Hi jonathanthomas,
    Since this issue is related to the web development,
    you could ask this question in the ASP.NET forum:
    http://forums.asp.net. If then, you could get
    an answer more quickly and professional. Thanks for your cooperation.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have 3 dynamic select menus in form but when submit when error - selection is lost

    Hi does anybody know how to make these select menus stay
    other than using javascript?
    I have looked on the internet for a looooong time for this
    and have no further knowledge.
    I can however get it to stay selected in an update record but
    not in an insert record. I have tried changing the recordset but it
    doesn't work.....
    Help please it is frustrating...........especially for users
    of the form I want them to use...........

    Thanks for your reply.
    I don't use javascript and the error checking I use is php.
    The menus I use are quite large so I have placed them
    dynamically within the form:<select name="stateCode"
    class="textarea">
    <?php
    do {
    ?>
    <option value="<?php echo $row_state['code']?>"
    ><?php echo $row_state['stateCode']?></option>
    <?php
    } while ($row_state = mysql_fetch_assoc($state));
    ?>
    </select>
    There are three of these, one for location, one for category
    and one for industry.
    They aren't connected for a series of dropdowns, just in the
    form.
    Can I please ask you about the <?=$option1;?> I have
    seen this in other forms.
    I was wondering wouldn't you need to have <?php echo
    .$option1;?>.
    Still learning about this fabulous php. I have left it for a
    while do learn other things and now am trying to catch up where I
    left off.
    I don't understand the difference between having
    <?=......?> and <?php echo.....?>
    I have seen some forms use e.g. <?=$add;?> in a
    textarea or checkbox where $add is the variable for error checking.
    Thanks again for your help.

  • Values of select-options lost in tabbed screen when in batch mode

    Hi,
    I have a very strange problem.  When I run the following program in online mode (with values given for s_time1-low, s_time1-high and p_time1 on the second tab), everything is fine and the values given for s_time1 and p_time1 are printed.  However, if I run the program in background (batch mode), the values s_time1-low and s_time1-high are initial and this is what is printed out.
    Does anyone have a clue what could be the reason for this behavior?  Any help is much appreciated!
    Best regards,
    Michael.
    Demo-Program:
    REPORT zdemo.
    SELECTION-SCREEN: BEGIN OF TABBED BLOCK maintab FOR 26 LINES,
      TAB (20) button1 USER-COMMAND pushmain DEFAULT SCREEN 100,
      TAB (20) button2 USER-COMMAND pushtime DEFAULT SCREEN 200,
      END OF BLOCK maintab.
    *********** MAIN SCREEN (100) ***********
    SELECTION-SCREEN: BEGIN OF SCREEN 100 AS SUBSCREEN.
    PARAMETERS:     p_test TYPE i DEFAULT 10000.
    SELECTION-SCREEN: END OF SCREEN 100.
    *********** TIMEFRAME SCREEN (200) ***********
    SELECTION-SCREEN: BEGIN OF SCREEN 200 AS SUBSCREEN.
    SELECT-OPTIONS:   s_time1 FOR sy-timlo NO-EXTENSION.
    PARAMETERS:       p_time1 AS CHECKBOX DEFAULT ' '.
    SELECTION-SCREEN: END OF SCREEN 200.
    START-OF-SELECTION.
      WRITE:/ 's_time1-low:', s_time1-low.
      WRITE:/ 's_time1-high:', s_time1-high.
      WRITE:/ 'p_time1:', p_time1.

    Hi,
    I played around with the code a little bit: When I load a variant containing data for both tab strips and I do not click on the second tabstrip and run the program then in online mode, se values for s_time1 are also missing.  It seems that SELECT-OPTIONS are only initialized with values when the user activated the tab.  Strange enough that this does not hold for normal PARAMETERS where the values are alway initialized.
    Unfortunately, I did not find a solution for this problem yet.
    Help is appreciated very much!
    Regards,
    Michael.

  • Is it possible to recover notes and highlights lost in one document?

    I made notes and highlights in one document and next ime I openned it everything was gone.

    It's a good idea to keep backups. You can make backups from Reader either by emailing a PDF, by copying it to a service like Dropbox or Acrobat.com, or by using iTunes.

  • Highlighting text fieldon focus with components

    Is there a way to highlight a text field when the focus is in that field. I know on a web page you can do this with JS, but wasn't sure about with AS. I am using components also.

    If you just want to highlight one word at a time then you can use:
    textComponent.setSelectionStart(...);
    textComponent.setSelectionEnd(...);
    The above code will use the default selection background/foreground font colours.
    Here is an example of a Find/Replace dialog that uses this approach.
    http://www.discoverteenergy.com/files/FindReplace.java
    If you want to get fancier and use different styles of fonts and colours for different words then you have to use JTextPane which supports StyledDocuments.
    The basic approach is to create attribute sets as follows:
    MutableAttributeSet comment = new SimpleAttributeSet();
    StyleConstants.setForeground(comment, Color.gray);
    StyleConstants.setItalic(comment, true);
    Document doc = textPane.getDocument();Insert new text into the document with the 'comment' attribute:
    doc.insertString( doc.getLength(), "comment text", comment);
    Change the attribute of existing text in the document with the 'comment' attribute:
    doc.setCharacterAttributes( 0, 3, comment, false );
    Here is a simple Java syntax highlighter that uses this approach:
    http://www.discoverteenergy.com/files/SyntaxDocument.java
    Note, most is the above code is devoted to handling multi-line comments. The main highlighting code is in the 'checkForTokens()' method.

  • Select in Navigator - wrong focus in 11g

    Hi, when I use "Select in Navigator" Atl+Home in JDev 11.1.1.0.2., appropriate class is correctly found and marked in navigator panel.
    But focus is NOT on navigator panel but in combobox with projects: so I can not simple scroll in navigator panel with arrows as in previous version JDev 10.1.3.
    Is this a bug or requiered feature?
    Thanks for answer,
    Jara

    Hi Jara,
    just playing with this feature in JDev 11.1.1.1.0 and also 10.1.3.3.0 but I getting focus only in project navigator in both. so I think it just navigates to the file - also in older versions
    regards,
    Branislav

  • Flex Tree does not selecting (highlight) the selectedIndices

    have an array of items that should be selected in my tree control. As you can see from my code below,I bind this array to the selectedIndices property of the tree. The selectedItems are not properly selecting in tree(selecting some other items and always root is selected).Flex seems to "ignore" my items (highlights some other indices). Am I missing something?
    Perhaps I'm going about this in wrong way?
    Thanks for your help!
    My XMLList:-
    <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
            <fx:XMLList id="XMLList">
            <node>
                <node name="max">
                    <node name="Emanuele"
                          surname="Tatti" age="23" wage="1200"/>
                    <node name="Francesco"
                          surname="Rapana " age="22" wage="1000"/>
                    <node name="Constantin"
                          surname="Moldovanu" age="23" wage="1200"/>
                    <node name="Marco"
                          surname="Casario" age="29" wage="1500">
                        <node name="Marco"
                              surname="Casario" age="29" wage="1500">
                            <node name="Marco"
                                  surname="Casario" age="29" wage="1500">
                                <node name="Marco"
                                      surname="Casario" age="29" wage="1500">
                                </node>
                            </node>
                        </node>                
                    </node>
                </node>
            </node>
            </fx:XMLList>
    </fx:Declarations>
    My Action Script Function:-
    public function select_tree():Void
    tree.validateNow();
    var allItems:Array = new Array();
    for(var n:Int =2;n<7;n+2)      
            allItems[n]=n; // o/p- 2,4,6
    tree.selectedIndices = allItems1;   //2,4,6 items should select ,but 0,2,4,5 are selected why?
    *****My MXML:-*****
    <mx:Button id="btn" label="Find Unmatch Nodes" width="221" height="30" click="select_tree()"/>
    <mx:Tree id="tree"  right="10" top="54" bottom="10" width="49.5%" dataProvider="{XMLList}"
        fontFamily="Verdana" fontSize="11" showScrollTips="true"
        allowMultipleSelection="true"
        alternatingItemColors="[#F5F5F5]"
        labelField="@label" selectionColor="#ECF335" showRoot="false"/>

    Are the nodes open to “expose” the children?

  • JFileChooser selected file changes when folder chages

    Problem with JFileChooser,
    The selected filename change when i change the directories, note that standard windows dialog doesnt behave like this .
    To reproduce: choose "save to file" in process dialog, enter the file name and then change the directory. The file name disappers from the corresponding box. The dialog must keep the entered file name while changing the folder path
    is this a bug ?,
    renjith

    Hi,
    Yes it is!
    http://developer.java.sun.com/developer/bugParade/bugs/4357012.html
    Regards,
    Manfred.

Maybe you are looking for

  • Problems Printing old CS1 files in CC

    Printing old files imported from CS1 in CC I get the following warnings: Warning   The document contains artwork that requires flattening.   The document contains RGB images.   The Document Raster Effects resolution is 72 ppi or less. I really don't

  • ABAP Proxy : Modification in Structure 2

    Hi, I try to modify a structure but i can not do that, because is "Proxy Structure (generated)", I excute the transaction SPROXY in order to modify this structure but i don't know how to find it Pls help , how to find the structure in this transactio

  • How to get ObjectType of form

    Hi All, I am working on SAP B1 i required help on Screen Painter. How to get ObjectType property of inbuilt form in SAP. And also how to get Database of respected table of perticular form. Can anybody suggest me some solution. Thanks,

  • How do I deactivate autocomplete in email body iPad?

    How do I deactivate autocomplete in email body iPad?

  • Maintenance Optimizer List displays many unfinished transactions

    Hello, In our solution manager, many unfinished maintenance transaction are displayed: <i>8000000080 New Maintenance Optimizer procedure 3: Medium New 15.10.2007 05:30:05 DDIC 8000000071 New Maintenance Optimizer procedure 3: Medium New 24.09.2007 07