Re-Rendering the entire panel with components based on list value selection

Hi,
I am new to swing.Wondering how to refresh the panel with modified data on selection from list.
Here's the code I am trying .
the function below is called withdifferent set of value s being passed in based on add,remove conditions.
public void initGroupPanelComponents(Vector GroupListData,Object[] sourceItemsArray,Object[] sinkItemsArray)
groupsPanel = new JPanel();
groupsPanel.setLayout(null);
botPanel = new JPanel(new BorderLayout());
botPanel.setSize(500,600);
if(sourceItemsArray.length!=0){
sourceLabel = "New Members:";
sinkLabel = "New Available";
System.out.print("color change now!");
groupsPanel.setBackground(Color.YELLOW);
botPanel.setBackground(Color.GRAY);
//revalidate();
else{
groupsPanel.setBackground(Color.BLUE);
botPanel.setBackground(Color.WHITE);
groupsPanel.setSize( 500, 300 );
groupsList = new JList(groupNameListData);
groupsList.setBorder(BorderFactory.createLineBorder(Color.gray));
groupsList.setBounds(10,10,350,230);
groupsPanel.add(groupsList);
groupsList.addListSelectionListener(new groupNameListAction());
groupsList.setListData(groupNameListData);
addButton = new JButton("Add");
addButton.setBounds(385,35,80, 20);
addButton.addActionListener(new addNewGroupAction());
removeButton = new JButton("Remove");
removeButton.setBounds(385, 70, 80, 20);
groupsPanel.add(addButton);
groupsPanel.add(removeButton);
duellist= new DualListPanel(sourceItemsArray, sinkItemsArray, sourceLabel,sinkLabel);
botPanel.add(duellist);
botPanel.setBounds(0, 270, 500,600);
botPanel.setOpaque(true);
getContentPane().add(groupsPanel);
groupsPanel.add(botPanel,BorderLayout.SOUTH);
getContentPane().invalidate();
getContentPane().validate();
setResizable(false);
setVisible(true);
Relevant suggestions are most welcome.
Thanks in Advance!

Thanks much our help.
But,apperars to me that I have added the groupsList to the panel in the method.
What I am trying to acheive here is, when a value is selected from the groupsList, accrodingly,in the ListActionListener, Iam trying to repaint the whole Panel with the list component above and duellist panel (a panel with 2 list components by side and buttons at the centre)obtained from dualListPanel Class .
Appears to work fine the first time when DualListPanel is nstantiated with certain data passed in.But when a particular list value on top is selected, i would require this dualListPanel to be instantiated with a new set of data passed in.This,for some reasons fails to come up.
Would Appreciate if you could suggest accordingly for this.
Thanks much again!

Similar Messages

  • In iTunes 11.0.2.26, an Albums search by track names returns albums as if they only have one track on them, but I still want to access the entire album. How can I have the search results show the entire album (with just the searched for name highlighted)?

    Hello, all.
    In iTunes 11.0.2.26, an Albums search by track names returns albums as if they only have one track on them, but I still want to access the entire album. How can I have the search results show the entire album (with just the searched for name highlighted)? For instance, I'm wanting to play an album with a particular track on it or I'm searching for albums that include that track. iTunes incorrectly assumes that all I'm after is that one track and then incorrectly displays the album as if there is only one ttrack on it. This is a bonkers default setting. Can I change this?

    Click the search magnifying glass and uncheck "Search entire library".
    Type in the name of the track.
    Click the album of interest to show tracks.
    Select the track.
    Press the X in the search box to clear the search.
    Double click the track you want to start playing first.
    tt2

  • I have tried to view videos created in premiere elements 10 and I get the following message: "this file type is not supported, or the required codec is  not installed.  When it opens there is a red screen in the monitor panel with Korean writing which als

    I have tried to view videos created in premiere elements 10 and I get the following message: "this file type is not supported, or the required codec is  not installed.  When it opens there is a red screen in the monitor panel with Korean writing which also appears in the place of each clip in the video.  I tried uninstalling and reinstalling premiere elements 10, but that did not have any effect on the video.  Do you have any suggestions?  I researched codec, but do not understand them at all.

    gloucester
    In case you did not find it, the following is a copy/paste of the Announcement on Premiere Elements 19/NVIDIA GeForce
    that appears at the top of this forum.
    Premiere Elements 10 NVIDIA Video Card Driver Roll Back
    If you are a Premiere Elements 10 user whose Windows computer uses a NVIDIA GeForce video card and you are experiencing
    Premiere Elements 10 display and/or unexplained program behavior, then your first line of troubleshooting needs to be rolling
    back the video card driver version instead of assuring that it is up to date.
    Since October 2013 to the present, there have been a growing number of reports about display and unexplained workflow
    glitches specific to the Premiere Elements 10 user whose Windows computer has a NVIDIA GeForce video card. If this applies
    to you, then the “user to user” remedy is to roll back the NVIDIA GeForce video card driver as far as is necessary to get rid of
    the problems. The typical driver roll back has gone back as far as March – July 2013 in order to get a working Premiere
    Elements 10. Neither NVIDIA nor Adobe has taken any corrective action in this regard to date, and none is expected moving forward.
    Since October 2013, the following thread has tried to keep up with the Premiere Elements 10 NVIDIA reports
    http://forums.adobe.com/thread/1317675
    Older NVIDIA GeForce drivers can be found
    http://www.nvidia.com/Download/Find.aspx?lang=en-us
    A February 2014 overview of the situation as well as how to use the older NVIDIA GeForce drivers for the driver roll back can be found
    http://atr935.blogspot.com/2014/02/pe10-nvidia-video-card-roll-back.html
    ATR

  • Macintosh transfer over the presets and preferences WITHOUT transferring the ENTIRE HD with "target disc mode

    I'm picking up the new 2014 MBP tomorrow so should be installing over the weekend / next week.
    I've been currently using a 2011 MBP with OS 10.7.5, using the "home" folder, which I will NOT be doing on the new one MBP with Mavericks.
    What is the best way to transfer over the presets and preferences I want, WITHOUT transferring the ENTIRE HD with "target disc mode" or something similar? I am FRESH installing all  APPLICATIONS.
    Mainly it's the presets and preferences I want to transfer.
    Thanks in advance.

    I'm picking up the new 2014 MBP tomorrow so should be installing over the weekend / next week.
    I've been currently using a 2011 MBP with OS 10.7.5, using the "home" folder, which I will NOT be doing on the new one MBP with Mavericks.
    What is the best way to transfer over the presets and preferences I want, WITHOUT transferring the ENTIRE HD with "target disc mode" or something similar? I am FRESH installing all  APPLICATIONS.
    Mainly it's the presets and preferences I want to transfer.
    Thanks in advance.

  • I lost everything in my iphoto library how can i restore the entire library with time machine?

    i lost everything in my iphoto library how can i restore the entire library with time machine? help!!!!

    Open the folder that contained the library and then enter Time Machine.  Select the most recent date that contains the library and then restore.

  • With 10.7.2 update iCal does not allow you to set "Reminders" by draging events from "All Day Events" into "Reminders" is there another way to do this instead of having to type out the entire reminder with date, time, and type?

    With 10.7.2 update iCal does not allow you to set "Reminders" by draging events from "All Day Events" into "Reminders" is there another way to do this instead of having to type out the entire reminder with date, time, and type?
    With Lion 10.7.1. you where able to drag events from "All Day Events" into the "Reminders" bar to create upcoming reminders.

    Exactly the same question I was about to post!
    Great being able to sync reminders (well overdue) however if I have to re-type a calener envent into reminders it's a waste of time!! 
    Come on Apple!!
    Just need an option for the calender event to add to reminder or the old drag to add to reminder functionality back, Please???

  • What's the exact difference between "Query Def. Filter Value Selection" and

    Hi Gurus,
    what's the exact difference between "Query Def. Filter Value Selection" and "Query Execution Filter Val. Selectn" in info-object's "Business explorer" tab?
    I found out that if my info-object A has a input-ready variable in a query,after the query running,in  the selection screen,my info-object A's F4 value is follow the setting of "Query Execution Filter Val. Selectn",as the setting of "Query Def. Filter Value Selection" I tried every diff setting, it won't effect my query anyway.
    so:
    1.what's the exact difference between "Query Def. Filter Value Selection" and "Query Execution Filter Val. Selectn" in info-object's "Business explorer" tab?
    2.how they effect query's presentation?
    I searched forum,didn't find the answer what I want.
    Thanks everyone.

    Hi Denny,
    I will try to explain it again.
    Query Def. Filter Value Selection : Let say the value is set to "Only Values in Infoprovider"
    Lets take an example infoobject - 0MATERIAL (Material)
    Total material records in material Master = 1000 (master Data table /BI0/PMATERIAL)
    You create a query on top of an Infoprovider using Material.
    Total unique materials in Infoprovider= 500.
    Now when you are in design mode in Query Designer, and you try to restrict Material by few materials (for e.g. 1, 2, and 3), for this you right click on material and select Restrict, the pop-up opens with list of materials, this list is all those 500 materials which are in the infoprovider, because the setting is  "Only Values in Infoprovider". Which means then when you are trying to restrict a characterstic in query definition the list of values displayed for restricition is derived from Infoprovider.
    Query Execution Filter Value Selection  - I think you already know what it is , its the read mode for F4 help selection.
    I hope this helps.
    Thanks
    CK

  • Failing to refresh LOV fields added in the query panel with table

    Hi.. Iam using Jdev 11.1.1.2.0
    I have a scenario like ..i need to add 2 cascaded lovs in search panel and clicking on search button, the result should be displayed in table form.
    For example..
    I have cascaded LOV fields departmentId and Firstname ,
    first name dropdown values depends on the selection of value in DepartmentIddropdown. I need to add only these 2 fields in search panel and clciking on search buton , the result should be displayed in emp table.
    I have achieved the same creating View criteria with 2 fields and dragging and dropping that as query panel with table. But my problem is First name lov is not populating based on department id. It is showing static dropdown list.
    Please help me how to achieve this ? thanks in advance.
    Regards
    Alekhya.

    Thanks for the reply.. actually if iam using those cascaded lovs in a form then we can set properties as u mentioned to refresh and display values correctly in the dropdown.
    My scenario is like i need to use those fields in query panel header
    code snippet
    <af:panelHeader text="Employees" id="ph1">
    <af:query id="qryId1" headerText="Search" disclosed="true"
    value="#{bindings.EmployeesViewCriteria1Query1.queryDescriptor}"
    model="#{bindings.EmployeesViewCriteria1Query1.queryModel}"
    queryListener="#{bindings.EmployeesViewCriteria1Query1.processQuery}"
    queryOperationListener="#{bindings.EmployeesViewCriteria1Query1.processQueryOperation}"
    resultComponentId="::resId1"/>
    </af:panelHeader>
    Iam not having any field names to add properties.
    Regards
    Alekhya

  • How to highlight the entire folder with the tag color, as before?

    I've always highlighted important folders with colors, so that they stand out among others in a list for quicker access. Now in Mavericks list view, there is only a small color dot to the right of the folder's name (sometimes very far from the folder's name if the column is large). As a result, it is much harder to pick important folders. Is there any way to apply the tag color to the whole folder, as it used to be in all previous systems? Or at the very least, to move the dot to the left of the folder name within lists, as in Icon view? I really hope Apple did not remove this feature simply for the sake of design. Thanks.

    mistersquid, S. G. is actually referring to the new Tags feature in Mavericks. This replaces entirely the Labels feature in previous versions of the OS, as far as I can tell.
    Labels would let you apply a color highlight to a folder. It would appear as a color behind the entire row.
    With Mavericks, however, Labels are gone and are replaced with Tags, which just puts a small colored dot off to the right of the folder name (and it's always like this, not just when you click on the folder), and some of these aren't distinct enough from one another (i.e. purple and gray look almost identical if you're scrolling through a series of "gray" folders pretty quickly—you may miss that one purple dot). Also, like S. G. mentioned, these can be pretty far off in your periphery if you've got long folder names, so this just adds another level of "hard-to-see-ness" (it's a technical term ).
    I'm a graphic designer and I have been using Labels to colorize my job folders according to their current status. For example:
    No label = job is open/in progress.
    The next color schemes were more of a "stop light" effect, going from red to green:
    Red = job is approved. Prep final files and send to printer/client.
    Yellow = job is done. Prepare job ticket/calculate time for billing.
    Green = job is done and job ticket is ready to go (hence the green color) to my co-worker for billing/invoicing.
    Gray = job is finished/billed/closed (i.e., I've "grayed it out").
    Purple = job transferred to another co-worker (i.e., I got too busy and they're working on it now). This one is a rarer color, and with Tags it's a bit difficult to discern one or two purple (more like a light lavender) dots in a sea of gray ones.
    I agree with S. G. and would love to see a stronger means of identifying the status of a project at a glance reappear—perhaps as a selectable alternative to Tags in the Finder preferences (because I can definitely see how the two means of colorizing a folder could compete with one another), like a checkbox to the effect of "Use Labels instead of Tags," similar to the "Open folders in tabs instead of new windows" option.
    Feedback submitted. Thanks, yodathejedi, for the link.
    Message was edited by: Xiebinrui -- oops, duplicated word. Fixed!

  • I accidentally deleted my whole i tune library. I was able to retrieve the entire library, but all my play lists have dissapeared and iTunes says that my ipod is not synced with this computer. Can i sync my playlists from my ipod to my itunes?

    i accadentally deleted my entire library (over 10,000 song) when i was trying to delete an old back up file off an external hard drive. Now when i open I Tunes and connect my ipod, a message says tht my ipod is not synced with this computer. This is the only computer this ipod has ever been synced to, so i don't know how to reconnect the two. I was able to restore all my music to the itunes library, but I lost all my playlists. I spent considerable time creating the playlists and they are stll on my ipod. Can I somehow sync in a way that my ipod can give the computer my play lists?

    With your iPod connected to iTunes right->click on it's device name in the left hand pane of iTunes under devices and select Export Playlists.
    B-rock

  • Is it possible to duplicate an item in the project panel with scripts?

    Hey  all, I'm trying to make a script that will duplicate an item in the project panel. I know you can duplicate an item in a comp, but I'd like to duplicate a project Item...app.project.item(2).duplicate();
    Something like that, is it possible with some other coding to do that?
    Thanks

    Dave, I'm trying to duplicate in a script running inside AE.  I guess I could try to do a system command to duplicate, but I'd really like to do it inside AE so I can keep track of the new layer.

  • Using a "menu ring" feature on the front panel with event structures

    hello - right now i have many event cases controlled by many "ok buttons". i would like to use a menu ring on the front panel to save space from all those buttons, but i don't see how it will work with all the individual event cases. currently each event is tied to a single button, and the menu ring acts as one thing on the block diagram so i can't tie an event to a choice in the menu. any suggestions? thanks....

    Alternativley, you could use an enum control instead of a menu ring. It will name the cases according to the selection automatically.
    If you want to use a menu ring and strings, you could do something like in this image.
    Message Edited by altenbach on 02-09-2006 01:43 PM
    LabVIEW Champion . Do more with less code and in less time .
    Attachments:
    RingText.png ‏3 KB

  • How to set the icon for the entire application with JFrame.setIconImage

    I set the icon on the main frame using JFrame.setIconImage(). The icon is shown properly in the main frame.
    If more JFrames are opened from the main frame, the newly opened JFrames also show the icon.
    However if JDialogs are opended, in some cases the icon set on the main frame is shown and in other cases the coffee cup.
    What is JFrame.setIconImage() expected to do? Setting the icon for a single JFrame or the entire application?
    How can I set the icon for the entire application?
    How can I set the icon for JDialogs?
    Thank you

    In order for your dialogs to use the same icon as the frame, you must parent the dialogs to the frame which has the custom icon.
    See the following thread for more information: http://forum.java.sun.com/thread.jsp?forum=57&thread=362542
    cheers,
    Greg

  • I want to save an image of the front panel, (with data), after every VI run

    When I try to copy the front panel (using a select all), and paist to paint, all the data in the graphs show up as they did after the last run, but the data in the charts dissapear. The chart itself is copied but the data is not. Any ideas on how to solve this?
    Thanks,
    Brian
    Attachments:
    Brians_graph_compilation2.vi ‏1363 KB

    This Knowledgebase also has some information on programatically saving VI images
    http://digital.ni.com/public.nsf/websearch/942DAA35C7B35616862565FE005F713F?OpenDocument
    (KB 197BB7VJ if the link doesn't work).
    Note that you don't have to put the code in the VI you are running in order to save it to a file, so you don't actually have to modify your VI. You can just run a seperate VI that uses the VI name from the first one (I've attached a VI which could either be run standalone or used as a SubVI, as well as an example of using it as a SubVI).
    If you don't want to do it programatically you could just hit the print screen button on your keyboard and then paste it into paint and crop off the extra windows stuff.
    Attachments:
    CreateVIJPEG.vi ‏34 KB
    ImageExample.vi ‏24 KB

  • I want to remove the emphasis "feature" in the address bar so I can see the entire address with the same boldness, like it was before. How?

    I really cannot stand the new feature in Firefox 6 that places emphasis on the main address in the address bar making it difficult to see the entire address. I want to see the entire address. How do I change it?

    You can set the pref <b>browser.urlbar.formatting.enabled</b> to <i>false</i> on the <b>about:config</b> page.
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold(user set).
    *Preferences can be reset to the default or changed via the right-click context menu.

Maybe you are looking for