JComboBox: arrowkey-selection : keep value of the display area

Hello!
I need to have a combobox where the user can iterate through its items using the arrowkeys without changing the value on the displayField. This should only change when the user presses Return.
Does anyone knows how should I proceed in order to have this behaviour?
Thank you,
Pedro

Hi,
I know a solution.
You use only a JTextField , set in editable false and implements a MouseListener. So when the user click on the JTextFied a ComboBoxPopup opens( where you want - normaly under the textfield).
these code you need :
// for the DefaultComboBoxPopup
import javax.swing.plaf.basic.BasicComboPopup;
// construct an instance using your old JComboBox
BasicComboPopup bcp = new BasicComboPopup(yourComboBox);
/** Later in the code you can use the ComboPopup like a normal  JPopupMenu to show the popup and hide the popup and set the location of it*/
bcp.setLocation(x, y);
bcp.setVisible(true);Then you must only install a ListSelectionListener or a Keyboard and a MouseListener on the JComboBox to react on user-input, to store the selected value in the JTextField.
Olek

Similar Messages

  • How to select multiple values from the parameters in BI Publisher report

    How to select multiple values from the parameter drop down in BI Publisher, and how to handle this mulitple values from the report sql...

    Hi kishore,
    I have used all the steps as you mentioned in your previous reply....including checking Mulitple Selection Check Box..
    Iam able to get the results when I am selecting one value..
    and also I am able to handle multiple values the in the query by using IN :Parameter, but seems when we select more than one value from the parameter drop down i think the Bi Publisher is sending the values in concatenated form something ilke
    ex: "'ACCOUNT','HR','SALES'" ,and when trying to display the parameters values in the output, its throwing the error as 'missing right paranthesis' ....on the whole do you have any solution which would handle
    1.Single selection.
    2.Multiple selection.
    3.'ALL' Values.
    4.Separating the concatenated string into individual strings and dispaly them on the output of the report..etc..in case of Mulitple selection.
    Ex:
    Concatenated String from BI Publisher:"'ACCOUNT','HR','SALES'"
    Expected Output on the report:ACCOUNT,HR,SALES
    reply to this would be much appreciated....
    thanks,
    manoj

  • How to select multiple values from the Parameters in the concurrent program

    How to select multiple values from the Parameters defined in the concurrent program...and i believe multiple selection is not a direct feature of EBS, but is there any workaround solution to acheive mulitple selection?

    I think there's no way to do that using standard feature.
    Some workaround I use :
    1. If the number of selections are fixed, you could use multiple parameters for the same valueset. For example :
    Selection1 : <choose first selection>
    Selection2: <choose 2nd selection>
    ..etc.
    If you don't use it then leave it empty.
    2. Use text varchar valueset and enter it manually and separate by comma (or other value) , eg : selection1,selection2,selection3....etc.

  • How to select all single values in the header area

    Dear Experts
    I got a request that the user wants to select a single value or all single values in the header area. E.g. if the values from characteristic master data are A, B, C and D, the selection can be one of these values or all of them. With the standard BPS configuration, due to the unique combination in the header area, selection of  'All' single values is not possible. Is there a way to select all single values in the header area?
    Thanks, Jessica

    Hi Jessica,
    Here is a solution where you need not to change your planning layout or to create a new variable or any exit function.
    Step 1 - Maintain master data value 'ALL' in the required characteristic.
    Step 2 - Create a copy function to copy all the required data records to 'ALL'. you can use standard copy function where you have to include only this characteristic in the fields to be change.
    Copy -
    From = all values (A,B,C,D etc)
    To = "ALL".
    Step 3 - Call this function on layout opening. you can include it in the planning folder and change the function attribute to call it on layout opening.
    Step 4 - Create a standard Delete function. you have to call this function on save operation. In this function, you have to delete all data records present in the buffer where required char contains 'ALL' value.
    This approach can impact the performance of the planning application. It depends on the number of data records you are dealing with. Standard Copy and Delete functions are pretty fast in nature.
    I hope it will help you. please let me know if you need more inputs.
    Regards
    Tarun

  • Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.

    Hi,
    I'm running WebLogic 5.1 sp10 on a Solaris box and I get the
    following error:
    java.rmi.RemoteException: java.lang.InternalError: Can't connect to
    X11 window server using ':0.0' as the value of the DISPLAY variable.
         at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
         at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:59)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:120)
         at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:58)
         at java.awt.Font.initializeFont(Font.java:264)
         at java.awt.Font.(Font.java:298)
         at com.hrw.xls.EmailXLSThread.getCellWidth(EmailXLSThread.java:162)
    caused by the following code fragment:
    Font f = new Font(fontName, fontStyle, fontHeight);
    FontMetrics fm = (new Panel()).getFontMetrics(f);
    Have I just forgotten to set an environment variable? I would prefer
    not to install bulky pieces of software, but if that's what it takes
    to get over this error, so be it.
    Thanks, Dave A.

    A Java AWT, X11 problem posted in the weblogic ejb newsgroup. I haven't been in here for long, but
    that has to be a first.
    If you have the DISPLAY env variable set to :0.0, you have to be at the console on a Solaris box
    running the XServer. 'xdm' I think is the code that has to be running. Also, I think the format is
    <hostname:0.0> or better <hostname:0> unless you are on a multi-headed workstation. Something like:
    export DISPLAY=hostname:0
    where hostname is the name of the host running an XServer and the .xhosts file allows access to the
    XServer from the display client.
    Apparently, you are not at the console?
    Anyway, I don't think there is a newsgroup here that I could even recommend to cross-post this to as
    it is not a WebLogic question. I think I would try the Discussion Forums at http://java.sun.com.
    Bill
    "D. Alvarado" wrote:
    Hi,
    I'm running WebLogic 5.1 sp10 on a Solaris box and I get the
    following error:
    java.rmi.RemoteException: java.lang.InternalError: Can't connect to
    X11 window server using ':0.0' as the value of the DISPLAY variable.
    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:59)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:120)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:58)
    at java.awt.Font.initializeFont(Font.java:264)
    at java.awt.Font.(Font.java:298)
    at com.hrw.xls.EmailXLSThread.getCellWidth(EmailXLSThread.java:162)
    caused by the following code fragment:
    Font f = new Font(fontName, fontStyle, fontHeight);
    FontMetrics fm = (new Panel()).getFontMetrics(f);
    Have I just forgotten to set an environment variable? I would prefer
    not to install bulky pieces of software, but if that's what it takes
    to get over this error, so be it.
    Thanks, Dave A.

  • Can't connect to X11 window server using ':0.0' as the value of the DISPLAY

    i try to use jfreechart to create a piechart on a aix os with jdk1.3.1 and the aix system does not have a xwindow installed
    and the found the following error
    java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:77)
    at java.lang.Class.forName1(Native Method)
    at java.lang.Class.forName(Class.java(Compiled Code))
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:72)
    at java.awt.Font.initializeFont(Font.java:285)
    at java.awt.Font.<init>(Font.java:319)
    at org.jfree.chart.plot.PiePlot.<clinit>(PiePlot.java:230)
    i got the tip of passing -Djava.awt.headless=true to vm to disable system graphic calls but after restart weblogic i still get the same error
    i am wondering if this case has something to do with jdk 1.3.1, and perhaps newer versions of jdk can take the parameter and operate correctly
    is that right?

    is headless option supported in jdk1.3.1?No,
    It was added in JDK 1.4:
    http://java.sun.com/j2se/1.4.2/docs/guide/awt/AWTChanges.html#headless
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4281163
    Kaj

  • [svn:fx-trunk] 11641: A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks , not just alpha masks.

    Revision: 11641
    Author:   [email protected]
    Date:     2009-11-10 18:29:57 -0800 (Tue, 10 Nov 2009)
    Log Message:
    A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks, not just alpha masks.
    QE notes: Please include tests for multiple graphic content nodes with masks under a .
    Doc notes: N/A
    Bugs:
    SDK-24133 - Multiple non-Group maskees don't work when using maskType="luminosity"
    Reviewer: Deepa
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

    Revision: 11641
    Author:   [email protected]
    Date:     2009-11-10 18:29:57 -0800 (Tue, 10 Nov 2009)
    Log Message:
    A simple fix - we need to keep track of the display list index for non-clipping masks such as luminosity masks, not just alpha masks.
    QE notes: Please include tests for multiple graphic content nodes with masks under a .
    Doc notes: N/A
    Bugs:
    SDK-24133 - Multiple non-Group maskees don't work when using maskType="luminosity"
    Reviewer: Deepa
    Tests run: Checkintests, Bug test case
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24133
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

  • Fetching more than one row from a table after selecting one value from the dropdown

    Hi Experts,
    How can we fetch more than one row from a table after selecting one value from the dropdown.
    The scenario is that I have some entries in the dropdown like below
      A               B               C        
    11256          VID          911256  
    11256          VID          811256
    11256          SONY      11256
    The 'B' values are there in the dropdown. I have removed the duplicate entries from the dropdown so now the dropdownlist has only two values.for eg- 'VID' and'SONY'. So now, after selecting 'VID' from the dropdown I should get all the 'C' values. After this the "C' values are to be passed to other methods to fetch some data from other tables.
    Request your help on this.
    Thanks,
    Preeetam Narkhede.

    Hi Preetam!
    I hope I understand your request proberly, since this is more about Java and less about WebDynpro, but if I'm wrong, just follow up on this.
    Supposed you have some collection of your original table data stored in variable "origin". Populate a Hashtable using the values from column "B" (let's assume it's Strings) as keys and an ArrayList of whatever "C" is (let's assume String instances, too) as value (there's a lot of ways to iterate over whatever your datasource is, and since we do not know what your datasource is, maybe you'll have to follow another approach to get b and c vaues,but the principle should remain the same):
    // Declare a private variable for your Data at the appropriate place in your code
    private Hashtable temp = new Hashtable<String, ArrayList<String>>();
    // Then, in the method you use to retrieve backend data and populate the dropdown,
    // populate the Hashtable, too
    Iterator<TableData> a = origin.iterator();
    while (a.hasNext()) {
         TableData current = a.next();
         String b = current.getB();
         String c = current.getC();
         ArrayList<String> values = this.temp.get(b);
         if (values == null) {
              values = new ArrayList<String>();
         values.add(c);
         this.temp.put(b, values);
    So after this, you'll have a Hashtable with the B values als keys and collections of C values of this particular B as value:
    VID --> (911256, 811256)
    SONY --> (11256)
    Use
    temp.keySet()
    to populate your dropdown.
    After the user selects an entry from the dropdown (let's say stored in variable selectedB), you will be able to retrieve the collection of c's from your Hashtable
    // In the metod you handle the selection event with, get the c value collection
    //and use it to select from your other table
    ArrayList<String> selectedCs = this.temp.get(selectedB);
    // now iterate over the selectedCs items and use each of these
    //to continue retrieving whatever data you need...
    for (String oneC : selectedCs) {
         // Select Data from backend using oneC in the where-Clause or whatever...
    Hope that helps
    Michael

  • When trying to import photos with iPhoto from photoshop.. won't let me keeps saying that the photos are already in the iPhoto library but they are not... need to fix this

    When trying to import photos with iPhoto from photoshop... won't let me keeps saying that the photos are already in the iPhoto library but they are not

    If you are using Photoshop from within iPhoto the following may help with the workflow.  However, we do need to know the answers to the questions posed by Terence and Larry to be able to help you.
    Using Photoshop or Photoshop Elements as Your Editor of Choice in iPhoto.
    1 - select Photoshop or Photoshop Elememts as your editor of choice in iPhoto's General Preference Section's under the "Edit photo:" menu.
    2 - double click on the thumbnail in iPhoto to open it in Photoshop.  When you're finished editing click on the Save button. If you immediately get the JPEG Options window make your selection (Baseline standard seems to be the most compatible jpeg format) and click on the OK button. Your done.
    3 - however, if you get the navigation window
    that indicates that  PS wants to save it as a PS formatted file.  You'll need to either select JPEG from the menu and save (top image) or click on the desktop in the Navigation window (bottom image) and save it to the desktop for importing as a new photo.
    This method will let iPhoto know that the photo has been editied and will update the thumbnail file to reflect the edit..
    With Photoshop Elements  the Saving File preferences should be configured as shown:
    I also suggest the Maximize PSD File Compatabilty be set to Always.  In PSE’s General preference pane set the Color Picker to Apple as shown:
    Screenshots are from PSE 10
    Note 1:  to switch between iPhoto and PS or PSE as the editor of choice Control (right)-click on the thumbnail and select either Edit in iPhoto or Edit in External Editor from the contextual menu. If you use iPhoto to edit more than PSE re-select iPhoto in the iPhoto General preference pane. Then iPhoto will be the default editor and you can use the contextual menu to select PSE for your editor when desired.
    Note 2:  editing a RAW file with either PSE or PS creates a new file which must be saved outside of iPhoto, i.e. the Desktop, and imported as a new photo into the iPhoto Library.

  • Passing values to the TEXT AREA in .HTML page.

    Hi,
    I have data in internal table and in context node in custom CRM component.
    I want to display this data in the textarea field. Is it possible to display this data in the text area? Should we use JAVASCRIPT for this one?
    Can anyone please give me the smaple code for passing the values to the text area?
    Please help me.
    Regards,

    Hi Pushpa,
    You can set the internal table values to the text area field using SET_PROPERTY method .
    Check for the context node in which that text field is there ,then get that context nodes current entity .Next set required values to that text area field.
    Regards
    Anitha

  • Default values for the controlling area and language

    Hello
    I have a query.
    I need to set default values for the controlling area and language in the screen
    "find account assignment data 1"
    Is it possible to do so?
    Thanks.
    Jayawant Gokhale

    Hello
    To clarify,
    This is the search used ,when I go for shopping.For the Cost assignment,the fields controlling area and language should be default for a user.
    Could someone throw a light on this.
    Thanks.

  • TS3771 Why can't I select "get info" from the file area so I can change the setting to "open in 32-bit mode" ?

    Why can't I select "get info" from the file area so I can change the setting to "open in 32-bit mode" ?

    It may be because of your settings. You can modify that setting in System Preferences > Trackpad. Another way of making right-click is to click the app icon while holding the Control key

  • Passing selection screen values to the next report using CALL TRANSACTION

    Hi experts,
    I have 2 reports. In the first report i have the 3 input fields in the first report, how do i pass the values to the next report which is transaction: ZKKBC_PKO_2.
    I want to display in the next report the selections that the user previously selected.
    First report:
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: COMP     LIKE AFRU-WERKS OBLIGATORY MODIF ID s1.
    PARAMETERS: PERIOD   LIKE COEP-PERIO OBLIGATORY MODIF ID s1.
    PARAMETERS: YEAR     LIKE COEP-GJAHR OBLIGATORY MODIF ID s1.
    SELECTION-SCREEN END OF BLOCK b1.
    CALL TRANSACTION 'ZKKBC_PKO_2'.
    Anyone can help me?
    Thanks,
    Lawrence

    Hi experts,
    What i did is this:
    Using SET PARAMETER
    in the first report
    SET PARAMETER ID 'WRK' FIELD COMP.
    SET PARAMETER ID 'VPE' FIELD PERIOD.
    SET PARAMETER ID 'GJR' FIELD YEAR.
    CALL TRANSACTION 'ZKKBC_PKO_2'.
    Second Report
    SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    PARAMETERS: WRK     LIKE AFRU-WERKS.
    PARAMETERS: VPE     LIKE COEP-PERIO.
    PARAMETERS: GJR     LIKE COEP-GJAHR.
    SELECTION-SCREEN END OF BLOCK blk1.
    Using SUBMIT
    First Report
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    PARAMETERS: COMP     LIKE AFRU-WERKS OBLIGATORY MODIF ID s1.
    PARAMETERS: PERIOD   LIKE COEP-PERIO OBLIGATORY MODIF ID s1.
    PARAMETERS: YEAR     LIKE COEP-GJAHR OBLIGATORY MODIF ID s1.
    SELECTION-SCREEN END OF BLOCK b1.
    SUBMIT ZCO_PRDCOST_ACTUAL_2 VIA SELECTION-SCREEN USING SELECTION-SETS OF PROGRAM 'ZCO_PRDCOST_ACTUAL_1' AND RETURN.
    Second Report:
    GET PARAMETER ID 'WRK' FIELD comp.
    GET PARAMETER ID 'VPE' FIELD COEP-PERIO.
    GET PARAMETER ID 'GJR' FIELD YEAR.
    Either this 2 ways i still cannot get the first report selection values on the 2nd report. Can someone help me see if my codes is correcT?

  • Retriving data from database on selecting particular value in the combo box

    Hi,
    On selecting the particular value from the combo box, the corresponding value of the other segement fields should be retrived from databse and displayed in the text box

    Babel,
    If you don't have a query bdoc and the business query that joins both 2 tables already, then please crate one.
    After that, write this code on the change of the combobox.
    You would have to change the names below for the Query, properties, anchor, parameters, controls.
    ===================================
    Private Sub ctrlBankNameCombo_onValueChanged2(ByRef boundAttributeChanged As Boolean)
    On Error Resume Next
    Dim objBankQuery As BusinessQuery
    Dim ObjBankCol As BusinessCollection
    Dim strID As String
    If Not boundAttributeChanged Then Exit Sub
    strID = ""
    strID = myanchor.bo.getAttribute("BankNameComboProperty") ' Bank ID
    If strID <> "" Then
        Set objBankQuery = gServices.factory.newBusinessQuery("MyNewQuery")
        objBankQuery.Mandt = "000"
        objBankQuery.BANKID = strID
        Set ObjBankCol = objBankQuery.query 
           If Not ObjBankCol Is Nothing Then  
               ctrlBankAddress.Value = ObjBankCol.getAttribute(1, "BankAddress")
               ctrlBankPhone.Value = ObjBankCol.getAttribute(1, "BankPhone")
           End If
    End If
    ===================================
    Regards,
    Vadim.

  • Select multiple values from the parameters in BI Publisher report  Error

    In the database, I wrote a function to retrieve data to report:
    FUNCTION FN_TL002(cBDSID nvarchar2)
    RETURN SYS_REFCURSOR as
    TYPE t_cursor is REF CURSOR;
    v_cursor t_cursor;
    begin
    OPEN v_cursor FOR
    select Brach, txmonth, txdate, total from tl001
    where brach in (cBDSID)
    order by brach;
    RETURN v_cursor;
    end fn_tl002;
    In Bi Publisher:
    - I have a type parameter Option select multiple ( pBranch), LOV get data from database.
    * In Data model : TL001 name
    + SQL query : select FN_TL002(:pBranch) from dual
    if select a value not error, and then select two values of an error: ORA-06553: PLS-306: wrong number or types of arguments in call to 'FN_TL002'
    please help me!
    Thanks all!

    See my response in the thread Re: Multi selecting drop down in BI publisher 11g report
    The LOV is a Java array and your function needs to accept that array. To do this the data data type has to be a VARRAY Type.

Maybe you are looking for

  • Setting the Default Value for a dynamic select menu

    Hi I have a php page with 2 forms on it, one feeds the other to achieve a drill down (manufacturer > model). In the second select menu I have a default static value "Select Aircraft Model", I want to set a value for the first dynamic select menu to r

  • Laserjet 3050 with MacBook Pro

    I saw another support message say that the HP laserjet 3050 is no longer supported on the Mac. Is this true? After a recent Mac update I have been unable to print. The printer dialog just says "Waiting for printer to become available." And it never b

  • GTX 770 hdmi and dvi issue

    Somehow hdmi and dvi cables cause random blackouts when not playing games. When i start playing game, it tends to blackout a few times then complete pitch black. The vga cable works. Any idea?

  • Why does my 4s weather show "Barlow"

    I noticed after the update that in weather there appears Barlow. I don't know where Barlow is and I can't seem to delete it. For a while, when I typed in my address in maps, it didn't show me as being at my house but in the church lot next door to my

  • Insert into table a (select * from table b) - need pk?

    Hi there. I'm going to insert into table FINAL (select * from table STAGING) - same structure but in STAGING the ID column has nulls. Do I need to provide the ID (primary key) for table FINAL or will it get created based on sequence/trigger? If I wer