How to customise JFileChooser -by adding a combo box to it

Hi,
In File chooser dialog(eg: Open File dialog)
1. can we add a component (a jcombobox ) to jfilechooser.
2. Can we handle invalid file operation when a file name is typed in filename field.
I have a serious issues with these things and i hope u people have a solution to forward it......
Looking forward and immediate reply....
cheers,
sharath

The solution u have sent applies for the images
only.....but This does not apply only for images.
I wanted to add jcombobox to jfilechooser for the
Filename field (in place of textfiled) where i can
drop down it and the previously selected files can be
viewed and selected in the combobox.How to replace a
"File Name " textfield with "jcombobox."
I hav used the foll code....You cannot replace File Name textfield with a combobox.
>
JFileChooser chooser = new JFileChooser(dirpath);
chooser.setFileFilter(new GenericFileFilter(fileExt,
"Text Files(*.txt)"));
chooser.setDialogTitle(title);
retVal = chooser.showOpenDialog(this);
pls help me immediately if u have a solution
The following code will filter the text files. Maybe not sure what you want.
>
cheers,
sharath

Similar Messages

  • InfoView - How to Restrict values of Month Dimension Combo Box

    Post Author: alexrox
    CA Forum: Publishing
    Product: Business Objects Enterprise XI R2
    Version: XI R2
    Patches Applied:
    Operating System(s): Linux RHEL 4 x86
    Database(s): Oracle 10gR2
    Error Messages:Steps to Reproduce:
    Hello, we are using Business Objects Enterprise XI R2 in the company I work, and we are facing a problem in some web intelligence reports.Our BO version is in Spanish, so maybe I do not translate some BO terms properly into English.
    We have the "Time" class in the Universe we use, and in that class, we have the "month" dimension.
    When we create some reports in InfoView, we can use the "month" dimension to display the results of that month (dragging and dropping that dimension in the "Analysis Context" Area).
    The user can choose values in the "month" dimention through a combobox in the "analysis context" area. The problem is that Infoview allows the user to select the value "all the values" of that dimension, I mean, all the months, so that the results of the report are according to the "automatic aggregation" calculated of the values of that dimension (all the months).
    But, we do not want to allow the user to select that value (all the values) of that dimension, because it causes that the report displays incorrect results (we have some percentages that have incorrect values in the aggregation, for example). I hope that you understand the problem I have tried to explain.
    My question is how can we restrict so that the combo box (of the month dimension at the analysis context area ) does not allow to select "all the values"?
    Is it possible?  If so, do we have to make a change in the universe or is it a restriction of the web intelligence repport?
    Thank you very much!
    Alejandro Usero Ruiz

    Post Author: jsanzone
    CA Forum: Publishing
    Alejandro,
    In your posting, quote "(we have some percentages that have incorrect values in the aggregation, for example).", I'm wondering if you are calculating the percentages within your universe or not?  I.e. do you have a universe object that in essence is doing the math?  If so, I might suggest that you not do it this way (even though in total aggregation calculations this will produce a valid result), but in disaggregate calculations (during the users "slicing and dicing") the percentages are not re-calculated by the BusObjects tool because it thinks that the data it received from the SQL output is good to go, and this is where the incorrect values in the aggregation start to show up.  We had this problem too, so we ceased from calculating at the universe level and built a local variable to the report, thus BusObjects will recalcuate the percentage properly for each level of aggregation that user selects.  The downside to this approach is that every report that has percentage calculations will require the local variable to be built for that report.  Even users who build their own reports will have to build their own local variable to compute the percentage for their reports.  The upside is that the calculations will be correct every time.

  • How to disable smartcut toolbar or sections combo box?

    Dear firends,
    How to disable smartcut toolbar or sections combo box?
    regards
    Siyavuş

    I am doing this from button OnClick now!!! but it not work for OnStartup document?!
    var x=document.getElementById("pageSelect")
    x.disabled=true
    regards
    siyavuş

  • How to enable group label selectable on combo box?

    When we use the combo box, we can group the items as following
    group 1
    item 1 1
    item 1 2
    group 2
    item 2 1
    item 2 2
    How to enable user select the group 1 instead of select both item 1 1 & item 1 2 ?
    In the jsf rendered result, group 1 & group 2 just a label and not selectable option, we want change it to selectable option.
    Thanks

    When we use the combo box, we can group the items as following
    group 1
    item 1 1
    item 1 2
    group 2
    item 2 1
    item 2 2
    How to enable user select the group 1 instead of select both item 1 1 & item 1 2 ?
    In the jsf rendered result, group 1 & group 2 just a label and not selectable option, we want change it to selectable option.
    Thanks

  • How can I set the size of combo boxes on a toolbar

    Hi, I am trying to use setMinimumSize of a combo box on a toolbar, It doesn't seem work. The code as following? Can anyone tell me how I can do it ?
    JComboBox sw = New ComboBox();
    sw.setMinimumSize(new Dimension(10,10));
    Thank you.
    Scott

    use the method preferred size of the JComponent superclass of the combos:
    setPreferredSize
    public void setPreferredSize(Dimension preferredSize)
    Sets the preferred size of the receiving component. If preferredSize is null, the UI will be asked for the preferred size.

  • How can I create a multi-line combo box?

    I am using Adobe Acrobat Pro 9 and I am trying to create a multi-line combo box on my fillable form.  At the bottom of this form/letter I would like to have a several paragraps that the user can choose from, but it's only allowing me to enter one line at a time.  Any help??

    Hi, Did you find the answer to this? I'm looking to create a combo box with multi-lines

  • How to show default value selected in combo box...

    Hi,
    I need an help...
    I have a combo box and i want to show the default value(coming from DB) selected on combo box on Page Render.
    Thanks,
    Neha

    Hi,
    Will this help?
    database default value in selectOneChoice
    Set default selected value in a SelectOneChoice
    Regards
    Vishal

  • How to hide certain items in a Combo Box

    I've two Combo Box(CB). First CB contain 4 items(drop-down menus) and the 2nd CB contain 12 items.
    I want that when I select one of the items from Combo Box1, then only 4 out of 12 items from Combo Box2 should be visible. So actually I want first combo Box to act as filter. Could this be done using the AS3 code.

    I don't think there is any way to hide items, but you can rewrite he items basd on the selectedIndex value of the cbHeight combobox.  In the code below, each element of the weightData array is an array of objects.
    import fl.data.DataProvider;
    var weightData:Array = new Array(); 
    weightData.push([{label: "100"},{label: "110"},{label: "120"},{label: "130"}]);
    weightData.push([{label: "200"},{label: "210"},{label: "220"},{label: "230"}]);
    weightData.push([{label: "300"},{label: "310"},{label: "320"},{label: "330"}]);
    function heightSelected(evt:Event):void
         var hSelected:int = evt.target.selectedIndex;
         var dp:DataProvider = new DataProvider(weightData[hSelected]);
          cbWeight.dataProvider = dp;

  • How do you set an array of combo boxes to a specific value?

    I have an array of combo boxes that I would like to set to a specific value. When I tell my program to set them it only sets the combo box that I most recently changed and none of the others. 
    I've attached a small vi that demonstates the problem. 
    Thanks, 
    --Ben
    Solved!
    Go to Solution.
    Attachments:
    ComboBoxProblems.vi ‏12 KB

    Your property node is for only one combo box (you can see this on the label and also by double clicking to go to UI element).
    If you want to change all of them then either follow previous suggestion or create a property node for the array and not just one of the combo boxes.

  • How to reduce the weight of a combo box in a jsp

    hi friends,
    i have developed a jsp form in which i have placed some combo box and i am using ajax concept for loading the details for a field just above the combo box.
    my problem is that when the ajax loads the records in the form it comes above the combo box .there,the combo box is coming above the ajax listings and hides the records displayed by ajax.can anybody help me to solve this problem of combo box.

    <td class="label">Cash bank general</td><td>   
    <html:select property="accledgeractionform.ledgercbg" styleId="cmbcbg" styleClass="inputbox" style=" width : 130px" tabindex="14" onfocus="setStatusMessage('Select cash bank general')" >
    <html:option value="" styleId="cmbCashBankGeneral">
    </html:option>
    <html:option value="C">Cash</html:option>
    <html:option value="B">Bank</html:option>
    <html:option value="G">General</html:option>
    like this i have created the combo box.
    but it is displayed above the results displayed by the ajax.
    i thought that since combo box is a heavy weight component its weight must be reduced.help me about that

  • How could I disable writing on a combo box ??

    hi guys
    please refer to the above subject ,,

    This message is very confusing. Could you please explain what you are trying to do with your "List-Item" and what you mean when you say you want to "+disable writing on a combo box+"? Looking at the responses so far to your original question - none of us truly understand what you are attempting so we are giving you the wrong answer to your question.
    Craig...

  • How to add an image to combo box model in java

    i want to display a images.for that i take a combox.in that i want to add al images those i want to display, while clicking the image in combo box the image will be display.there is no problem for displaying an image, but i dont know how to add
    an image to a combo box model in net beans. please help me. if u have any idea plese forward to this mail
    [email protected]

    Hi Thomas,
                     You need to create an image field and in the source choose 'graphic content ; give the name of the variable which has the binary data . and give the type as 'MIME/image'.

  • Adding multiple separators in combo box

    i want to add multiple separtors in my combo box items but i can add - Value in the items list only once so i get only one separator, how can i add multiple separators in combo box items
    Tushar Jambhekar
    [email protected]
    Jambhekar Automation Solutions
    LabVIEW Consultancy, LabVIEW Training
    Rent a LabVIEW Developer, My Blog

    Tushar Jambhekar wrote:
    I tried that already, but it doesnt work
    Works fine here:
    Actually, I would argue that this is a bug in the editor, which should ingnore duplicate hypens if they have a special value.
    Try to take over the world!
    Attachments:
    Combo.PNG ‏13 KB

  • How to edit items of a combo box that is part of an array of clusters

    Hi,
    In the attached vi, I have an array of clusters, and each cluster contain two combo boxes. How do I edit the items in Combo Box 1 for all elements of the array? (All Combo Box 1 elements shall include the same items.)
    For illustration, I also included the trivila case, i.e., editing the items in a separate combo box that is is not part of an array of clusters (Combo Box 3). Please advise. Thanks.
    Peter
    Solved!
    Go to Solution.
    Attachments:
    Question Combo Box in Array of Clusters.vi ‏16 KB

    Please mark S_Mercurio's message as the solution to your question rather than your own thank you  message.  First you will have to unmark  yours by going to the option menu to the upper right of your message.

  • Resetting a combo box

    I have added a combo box to the invoice form and populated the validvalues collection with a list of warehouses for the user to choose from.  This only appears in Add mode. 
    Everything works well except after adding an invoice, when all the SAP fields are reset to blanks or their default values,  the combo box still has the value that the user selected from the previous invoice.  I would like to have the box be empty (as it is when the form is first displayed).
    Does anyone know how to do this?  SBO 2005  - Thanks in advance!

    Hi John Chadwick 
    You can try the following
    try
           If oCombo.ValidValues.Count > 0 Then
                    oCombo.ValidValues.Add("", "")
                    oCombo.Select(oCombo.ValidValues.Count - 1, SAPbouiCOM.BoSearchKey.psk_Index)
                    For i = 0 To oCombo.ValidValues.Count - 1
                        oCombo.ValidValues.Remove(0, SAPbouiCOM.BoSearchKey.psk_Index)
                    Next i
                End If
    catch ex as exception
    'leave blank
    end try
    Hope this helps

Maybe you are looking for

  • Document Generation Wizard - disregard picked Items for Delivery Notes

    Hi, We have a requirement from a customer whereby when they are creating Delivery Notes from Sales Orders via the Document Generation Wizard to exclude quantities of Items which have been picked on the Sales Order already.  E.g. Sales Order, Product

  • Error message Adobe Premiere Pro CC has stopped working

    I am working from a PC with Windows 7 and an i7 intel CPU. Premiere was working just fine and then one day it decided to throw errors at me when I try to place a clip on the timeline. The program will start up fine and import video clips, but won't a

  • VDI - RemoteApp does not start in "Virtual machine-based desktop deployment" environment

    Hello dear community, I would like to familiarize myself to the subject of desktop virtualization and have built up a test environment for this purpose. Most went smoothly, but now I'm trying for days to figure out, why the deployed RemoteApp program

  • How to developer reports ?

    Post Author: alrmd CA Forum: Crystal Reports I have CR XI, and i have developed some reports, but i can only run and refresh data in my own pc, because the Viewer software can not do that, so i want to ask, what do i need to do in order the users can

  • Explain plan not displayed in sql trace file

    Hello, I don't understand why in sql trace file, after tkprof transformation, for several queries the explain plan is displayed and for several queries, no explain plan is displayed. How can I have the explain plan for all queries? Thanks for your he