Able to select in list.

Dear Java-ers
I have a questions about the use of JList. I want to built a program with two list boxes, the content of first list box is hardcoded, and at run time, when user click on the content of first list box, then the second list box will be filled. Then when user clicks on second list box, JLabel1 will show the clicked content. I have tried to build the application, but when I tried to clicked on my first list box, nothing happened, no event fired, and it seems there are no mouse clicked (pressed) event. Could you help me on this problem ? Thank you very much for the help.
Code :
import java.awt.*;
import javax.swing.*;
import java.util.*;
import com.borland.jbcl.layout.*;
import java.awt.event.*;
public class Frame1 extends JFrame
XYLayout xYLayout2 = new XYLayout();
JLabel jLabel1 = new JLabel();
JScrollPane jScrollPane1 = new JScrollPane();
JScrollPane jScrollPane2 = new JScrollPane();
JList jList1 = new JList();
JList jList2 = new JList();
public Frame1()
try
jbInit();
catch(Exception e)
e.printStackTrace();
private void jbInit() throws Exception
this.setBounds(50,50,400,300);
this.getContentPane().setLayout(xYLayout2);
xYLayout2.setWidth(400);
xYLayout2.setHeight(260);
jLabel1.setText("jLabel1");
jList1.setBorder(BorderFactory.createEtchedBorder());
jList1.addMouseListener(new Frame1_jList1_mouseAdapter(this));
jList2.setBorder(BorderFactory.createEtchedBorder());
jList2.addMouseListener(new Frame1_jList2_mouseAdapter(this));
Vector test = new Vector();
test.add("a");
test.add("b");
test.add("c");
jList1 = new JList(test);
this.getContentPane().add(jScrollPane1, new XYConstraints(39, 35, 140, 161));
jScrollPane1.getViewport().add(jList1, null);
this.getContentPane().add(jScrollPane2, new XYConstraints(210, 36, 153, 165));
jScrollPane2.getViewport().add(jList2, null);
this.getContentPane().add(jLabel1, new XYConstraints(39, 216, 322, 35));
static public void main(String args[])
(new Frame1()).setVisible(true);
void jList1_mousePressed(MouseEvent e)
System.out.println("adafad");
Vector test1 = new Vector();
test1.add("e");
test1.add("f");
test1.add("g");
jList2 = new JList(test1);
jScrollPane2.getViewport().add(jList2, null);
void jList2_mousePressed(MouseEvent e)
this.jLabel1.setText((String)this.jList2.getSelectedValue());
class Frame1_jList1_mouseAdapter extends java.awt.event.MouseAdapter
Frame1 adaptee;
Frame1_jList1_mouseAdapter(Frame1 adaptee)
this.adaptee = adaptee;
public void mousePressed(MouseEvent e)
System.out.println(e.getX());
adaptee.jList1_mousePressed(e);
class Frame1_jList2_mouseAdapter extends java.awt.event.MouseAdapter
Frame1 adaptee;
Frame1_jList2_mouseAdapter(Frame1 adaptee)
this.adaptee = adaptee;
public void mousePressed(MouseEvent e)
adaptee.jList2_mousePressed(e);

Hi,
I think you found the limits of JBuilder!
(Personnally, I don't use JB because I find the generated code very confusing and complicated... even if it is perhaps the quickest one ? Didn't verify this)
Try removing the line
jList1 = new JList(test);which I think is removing the preceding listener put on the list...
Hope this is the problem... if not, tell me and I'll be back :))
Regards.

Similar Messages

  • In PCUI - Not able to select Attribute list in segment builder

    Hi experts,
    I have CRM 5.0 PCUI, It is not showing the frame which I can choose Attributes list in order to create profile groups and target groups for Segmentation
    I'm looking for something similar as tcode: CRMD_MKTSEG in SAP GUI.
    I have already assigned Marketing Manager/Assistant in my profile.
    Am I forget anything ?
    regards,

    Hi ahm,
    Kindly assign the CRMD_MKTSEG role from GUI to u r User and for portal assign standard iview of Segment Builder and u'll see the tab Segment bulider in u r PCUi screen, u can create Attributes list, profile groups and target groups for Segmentation.
    Hope it'll help u .
    Thanks,
    Dipesh.

  • How do I create my own favorite template for DVD slideshows? I used to be able to select this from pulldown menu, but cannot now do so. I am directed straight to templates, which take more memory. I have a large slideshow, and need all the space I can get

    First, how do I create my own favorite theme template for DVD slideshows? I used to be able to select this from pulldown menu, but cannot now do so. I am directed straight to already existing themes, which take more memory. I have a large slideshow, and need all the space I can get. I just want to use a picture as my DVD cover, and then insert a slideshow. Also, when I try to burn my 8.5gb double sided slideshow, all that burns is the music. It is a large slideshow, a memorial on the life of my now deceased brother. This means a lot to me and to my family, and I am having so much trouble trying to burn it. I have gone into Project View and selected appropriately. The bar shows I have room to burn this DVD, but it does not burn.  I have burned so many DVDs in the past, but this one just will not burn. I am so confused at this point. I will say this is the first 8.5gb I have attempted to create and burn. My specs list a 7.7gb or 4.7gb as operable....but there are no 7.7gb dvds. I had to purchase 8.5gb. Help? What am I doing wrong? I have spent so much time on this, and just cannot figure it out.

    Final Cut is a separate, higher end video editor.  The pro version of iMovie.
    Give iPhoto a look at for creating the slideshow.  It's easy to assemble the photos in an album in iPhoto, put them in the order you want and then make a slideshow of them.  You can select from various themes and transitions between slides and add music from your iTunes library.
    When you have the slidshow as you want use the Export button at the bottom of the iPhoto window and export with Size = Medium or Large.
    Save the resulting Quicktime movie file in your Movies folder.
    Next, open iDVD, choose your theme and drag the QT movie file into the menu window being careful to avoid any drop zones.
    Then follow this workflow to help assure the best qualty video DVD:
    Once you have the project as you want it save it as a disk image via the File ➙ Save as Disk Image  menu option. This will separate the encoding process from the burn process. 
    To check the encoding mount the disk image, launch DVD Player and play it.  If it plays OK with DVD Player the encoding is good.
    Then burn to disk with Disk Utility or Toast at the slowest speed available (2x-4x) to assure the best burn quality.  Always use top quality media:  Verbatim, Maxell or Taiyo Yuden DVD-R are the most recommended in these forums.
    The reason I suggest iPhoto is that I find it much easier to use than iMovie (except for the older iMovie 6 HD version).  Personal preferences showing here.

  • I Just received the update to iTunes, when I I look at the screen I do not see the normal icons.  When I select movies I do not get the new downloads unless i select the list in the sub file. How do I get backto the old method of seeing and using iTunes??

    I Just received the update to iTunes, when I I look at the screen I do not see the normal icons.  When I select movies I do not get the new downloads unless I select the list in the sub file. How do I get back to the old method of seeing and using iTunes??

    I can tell you that this is some of the absolutely worst customer service I have ever dealt with. I found out from a store employee that when they are really busy with calls, they have third party companies taking overflow calls. One of those companies is Xerox. What can a Xerox call center rep possibly be able to authorize on a Verizon account?  I'm Sure there is a ton of misinformation out there due to this. They don't note the accounts properly or so everyone can see them. I have been transferred before and have asked if they work for Verizon or a third party also and was refused an answer so, apparently they aren't required to disclose that information. I spent a long time in the store on my last visit and it's not just customers that get the runaround. It happens to the store employees as well and it's beyond frustrating.

  • Help!  I recently upgraded to OS 10.9.4 from 10.6.8, and now when I want to send an email to a group in my contacts I am no longer able to select the group as a whole.  I have to select each address individually.  This can't be right.

    Help!  I recently upgraded to OS 10.9.4 from 10.6.8, and now when I want to send an email to a group in my contacts I am no longer able to select the group as a whole.  I have to select each address individually.  This can't be right.  With 10.6.8 I used to be able to double click on the name of the group and they would all be selected.  I've also noticed that my address book is now called "contacts."  Thanks in advance for your help.

    Try these in order testing your system after each to see if it's back to normal:
    1. a. Resetting your Mac's PRAM and NVRAM
        b. Intel-based Macs: Resetting the System Management Controller (SMC)
    2. Restart the computer in Safe Mode, then restart again, normally. If this doesn't help, then:
         Boot to the Recovery HD: Restart the computer and after the chime press and hold down the
         COMMAND and R keys until the Utilities menu screen appears. Alternatively, restart the
         computer and after the chime press and hold down the OPTION key until the boot manager
         screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    3. Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the Utilities menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu. Select Restart from the Apple menu.
         Reinstall the 10.9.4 update: OS X Mavericks 10.9.4 Update (Combo).
    4. Reinstall Lion/Mountain Lion, Mavericks: Reboot from the Recovery HD. Select Reinstall Lion/Mountain Lion, Mavericks from the Utilities menu, and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.
         Reinstall the 10.9.4 update: OS X Mavericks 10.9.4 Update (Combo).

  • Not able to select images in iphoto 8????

    Since I've installed iphoto 8, I'm not able to select my pictures as I did with iphoto 6. When adding images through yahoo mail for example, I was able to before locate my iphoto folder, and it would give me a drop list of all the pictures. With iphoto 8, all I see is "iphoto library" and its faded out and I can't select it.
    Does anyone know if this is just the way iphoto 8 works, or is there a way to fix this. The only solution I have found, is I have to copy the pictures on to my desktop and then select them from there.
    Please help
    Thank you in advance

    THe basic answer is to export them to a desktop folder and access them form there
    for a comnplete discussion see TD's post here -- http://discussions.apple.com/thread.jspa?threadID=1199193&tstart=15
    Larry Nebel

  • Found cure for Acrobat 9 not able to select Printer in Page setup.

    This may already be covered in another thread. In fact I used this as suggestion to cure another problem in another thread. That was related to editing files in Acrobat 9. It cures this problem I brought up on forum a week after I installed acrobat 9.
    Every since I purchased by download Acrobat 9, I have been unable to slect a Printer in the Page setup. when clicking any printer your supposed to see a drop down list of all the print Drivers you have installed. I got
    nothing.
    I downloaded and installed Reader 9.0. Low and behold I am now able to select the desired printer. in Reader 9
    and Acrobat 9.
    So anyone having these issues. download and install Reader even if you never use it. The installer evidently inserts some code they forgot to put in Acrobat 9.

    Well, come to find out. It works on my G4-500 as stated on my OSX.4.11 Drive. But I updated on my Firewire drive and still have same issue with Acrobat. But Reader I am able to set printer.
    On my PowerBook 17 G4-1.67Gb Laptop neither works I don't know what to do. adobe is no help.

  • Todo tab: Routes displayed when selecting the List View

    Hi,
    I have a question about the routes that appear on the workspace's  "To do" list view, and how to perform validations when they are  clicked.
    I've created a process that starts with a form being created by a  user. Then, it's validated by a sequence of other users. Each one sees a  different set of routes. On one of the steps of the process, one of the  routes requires the user to input a text.
    The condition is checked on the click  event of the AWS_SUBMIT button, where I've also put the text request. If the user is using the  card view on the "To do" tab and clicks on the item, the form opens and,  when the user submits it, all works as expected. However, if he has the  list view and clicks once on the item, the route names appear on the  bottom right of the workspace, and he's able to select them. As the form  hasn't been opened, there's no control on the selected route, and the  user is never asked to input the text. On the next step of the process,  which depends on this text, the process gets stalled.
    Is it possible to hide these routes on the workspace, disable the  list view, or stop the submit if it hasn't been started without opening  the form? I know you can customize the workspace, would this allow me  to remove the route buttons?
    The version we are using is LiveCycle ES 8.2.1.3.
    Thank you

    Is there any way to hide the submit button(green check mark) that appears on the task card when a user saves a form in their draft folder.
    Users are bypassing the form validation by submitting a form this way.  For instance, a user will fill out the form with values that do not pass validation.  They will save the form in their drafts folder.  The user will then close the form and navigate to their draft folder.  Without opening the form again, they will click the green check box submit button and a form with invalid data will be submitted to the process.
    This is LC 8.2.1.3.

  • Is there a way to be able to select all mail on iPad/iPhone?

    Is there a way to be able to select all mail on iPad/iPhone all together as opposed to one at a time?

    If you have iOS7 yes. In the mail list you tap 'edit' and then choose hte mails you want, then at the lower right you'll see the option to trash the mails.
    If you do not have iOS7 then you cannot mass delete.

  • Not able to select MS SQL Server tables in sqldeveloper using dblink

    Hi All,
    I able tp select MS SQL table columns in sqlplus prompt but i am not able to select same thing in sql developer using dblink.
    If i use convert(<mycol>,'WE8ISO8859P1','utf8') in sqldeveloper its working, how to select MS SQL columns without convert function.
    Thanks,
    -Mani

    Mani,
    This is a problem with SQL*Developer and converting nvarchar characters.
    The workround is to install the Oracle client software and use the option in SQL*Developer -
    - Tools
    - Preferences
    - Database
    - Advanced
    - and click the 'Use OCI/Thick driver' option.
    I made these steps -
    - download the 11.1 client software from eDelivery -
    http://edelivery.oracle.com/
    - go through the administration screens (name, etc)
    - on the next screen ' Media Pack Search' screen choose -
    - Select a Product Pack - Oracle database
    - Platform - Microsoft Windows (32-bit)
    - Oracle® Database 11g Release 1 (11.1.0.6.0) Media Pack for Microsoft Windows (32-bit)
    - then download -
    Oracle® Database 11g Release 1 Client (11.1.0.6.0) for Microsoft Windows (32-bit) CD
    - Install the Instant Client and also apply the 11.10.7 patchset to the ORACLE_HOME where you install the client. (if you are using 11.1.0.7 RDBMS)
    - for Windows change the PATH system variable to make sure the 11.1 RDBMS and Client ORACLE_HOME directories are listed before any other Oracle directories
    - started SQL*Developer and clicked the 'Use OCI/Thick driver' option
    - could then run the select -
    select "col2" from test_nvarchar@dg4msql ;
    without any problems.
    If this is still a problem for you then let us know the description of the columns in the SQL*Server table that give the problem and the exact errors you receive.
    Regards,
    Mike

  • Unable to Select from List of Processes

    Hi all.
    I'm having an issue where I am unable to mouse click (or select) from a list of processes. This is happening in three different areas. When I click Start Processes, I am able to select an employee (even from HR Admin I can enter an employee) without any problems. Then after choosing my employee, I click the button 'Select Process' and I get a list of P&Fs processes. However, the top process is pre-selected and I am unable to select any other process. Even though the list of processes are different for HR Admin and manager, I still can only proceed to the Adobe form with the first (top) process. If I click edit to continue to the adobe form it opens the top selected form without an issues.
    This also happens from the "Find Processes" overview screen. After entering my select criteria of processes to search, I get a list of process transactions which have been started but again, I am only able to see the details of the first one (and I cannot select any other process).
    I am running Ehp 3 with the latest patches to BPs and ECC 6.0 (as of 1/3/2010). I've also tried using different browsers including IE 8 and Google Chrome.
    Much appreciated in advance!
    Derrick

    Hi Chris.
    Not sure what to look for when you reference 'controls'. As far as the business packages, they are up to date. I've eliminated the issue being ECC 6 related. Just not sure what to check on the portal side that could be causing this. Any suggestions on how to check (and update if necessary) the controls?
    Thanks,
    Derrick

  • I would like to use time Machine to back up to a network SMB drive. I can see the drive on my desktop but it will not show in the time machine window to be able to select it

    I currently have a mini server (OSX10.8.5, server 2.2.2) that I am using Time Machine to back up 4 external drives that are connected to the server via firewire 800. I would like to use Time Machine to back up to a windows network SMB drive. I can see the drive on my desktop but it will not show in the time machine window to be able to select it for use.
    Can this be done
    Thanks for any and all help

    The supported targets for Time Machine backups are local (direct-connected) disks, and network targets include Time Capsule, a disk hanging off the current-generation AirPort (though not earlier AirPort devices), and OS X Server systems.
    The Time Machine storage is based on the HFS+ file system, so I would not expect TM to work with SMB file services.
    While there are hacks to allow Time Machine to access network drives, I would not consider those to be reliable. Skim the forum and the 'net for related details, and for previous discussions of setting this up and the related issues that can arise.
    Remember to test the recovery with whatever you decide to use; whole point of backups is the ability to restore the data, after all.
    If you want to learn more about Time Machine, Pondini is an excellent resource.

  • SSRS report - A single selection dropdown list converted to text box

    Hello everyone,
    We created a single selection dropdown parameter (City parameter) on a report. The data in this parameter is populated using MDX query. Also, it is filtered based on selection of another single selection dropdown list (Country parameter) of a report.
    The problem is when there is no cities for the selected country the dropdown list is gets converted to free type text box and user can insert city data in it. Why SSRS is not keeping it as empty dropdown list with no data?
    Any help would be much appreciated.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

    Hello Charlie,
    We developed a fresh report only with two parameters but still the dropdown control gets converted to text box in our case. We have two single selection parameters, Location and Customers. Based on selected Location the customer
    dropdown gets populated.
    Location Parameter Query
    WITH MEMBER [Measures].[ParameterCaption] AS [Location].[Location Name].CURRENTMEMBER.MEMBER_CAPTION MEMBER [Measures].[ParameterValue] AS [Location].[Location Name].CURRENTMEMBER.UNIQUENAME MEMBER
    [Measures].[ParameterLevel] AS [Location].[Location Name].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , [Location].[Location Name].ALLMEMBERS ON ROWS FROM [Model]
    Customer Query
    WITH MEMBER [Measures].[ParameterCaption] AS
    [Customer].[Customer Name].CURRENTMEMBER.MEMBER_CAPTION
    MEMBER [Measures].[ParameterValue] AS
    [Customer].[Customer Name].CURRENTMEMBER.UNIQUENAME
    MEMBER [Measures].[ParameterLevel] AS [Customer].[Customer Name].CURRENTMEMBER.LEVEL.ORDINAL
    SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel],[Measures].[Amt]} ON COLUMNS,
    nonempty([Customer].[Customer Name].ALLMEMBERS,[Measures].[Amt]) ON ROWS FROM ( SELECT ( STRTOSET(@LocationName, CONSTRAINED) ) ON COLUMNS FROM [Model])
    Regarding parameter settings on General tab for both the above parameters we did not select any of the following values, all these checkboxes are empty:
    Allow Blank Value ("") , Allow null value, Allow multiple values.
    I think it has something related to [Measures].[Amt] that we used in customer parameter. We are now trying to take other two parameters where we would be not using the [Measures].[Amt] to filter the data. Will update you soon.
    Thanks, Ankit Shah
    Inkey Solutions, India.
    Microsoft Certified Business Management Solutions Professionals
    http://www.inkeysolutions.com/MicrosoftDynamicsCRM.html

  • I have an iTunes account where I have downloaded Digital movies & I am able to see the list on the desktop of the original downloads. When I log on another device with my login I do not see my list to access them. Why can't I access from another device

    I have an iTunes account where I have downloaded Digital movies & I am able to see the list on the desktop of the original downloads. When I log on another device with my login I do not see my list to access them. Why can't I access from another device

    Hey GingCarv,
    Great question. You'll want to download the movies from your purchase history. The following article explains how to do so:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    http://support.apple.com/kb/HT2519
    Note: At this time, movies are not available for automatic downloads.
    Thanks,
    Matt M.

  • I'm having problems (1)selecting onscreen text, (2) having problems resizing menu boxes and selecting menues with the cursor. I'm not able to select menus and move them. I'm not sure how to correct this.

    I'm having problems (1) selecting onscreen text, (2) resizing menu boxes and selecting menues with the cursor. I'm not able to select menus and move them. I'm not sure how to correct this.

    1) This is because of software version 1.1. See this
    thread for some options as to how to go back to 1.0,
    which will correct the problem...
    http://discussions.apple.com/thread.jspa?threadID=3754
    59&tstart=0
    2) This tends to happen after videos. Give the iPod a
    minute or two to readjust. It should now be more
    accurate.
    3) This?
    iPod shows a folder icon with exclamation
    point
    4) Restore the iPod
    5) Try these...
    iPod Only Shows An Apple Logo and Will Not Start
    Up
    iPod Only Shows An Apple Logo
    I think 3,4, and 5 are related. Try the options I
    posted for each one.
    btabz
    I just noticed that one of the restore methods you posted was to put it into Disk Mode First rather than just use the resstore straight off, I Have tried that and seems to have solved the problem, If it has thank you. previously I have only tried just restoring it skipping this extra step. Hope my iPod stays healthy, if it doesnt its a warrenty job me thinks any way thanks again

Maybe you are looking for