How to change the defaultCellEditor to a JFileChooser

i am currently making a table that require input of a file name. for the sake of easy use, i plan to use fileChooser to replace default hardcode editor. when the user click on a cell, fileChooser (my CellEditor) will popup automatically to prompt user to choose a specific file type. As the topic, i am not quite sure how to change the defaultCellEditor to implement as a JFileChooser. So can anyone help me a bit, thx a lot!!!

i am currently making a table that require input of a
file name. for the sake of easy use, i plan to use
fileChooser to replace default hardcode editor. when
the user click on a cell, fileChooser (my CellEditor)
will popup automatically to prompt user to choose a
specific file type. This is covered in the Java Tutorial.
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#editor

Similar Messages

  • How to change the Icon for a JFileChooser ?

    Has anyone figured out how to change the icon for an instance of JFileChooser from the coffee cup to something else?
    I'm on 1.4
    Thanks,
    Ken

    Never mind. I figured it out.
    You have to use an instance of JFrame in the call to showXxxxDialog(Component c). Set the icon of the JFrame to what you want the JFileChooser's icon to be.

  • How to change the icon of JOptionPane and JFileChooser in swing

    Hi,
    Does any body know how to change the icon of JOptionPane and JFileChooser in swing.
    Please help me out in this.
    Thanx in advance.

    Try this
    import javax.swing.*;
    import java.awt.event.*;
    public class Untitled4 {
      public Untitled4() {
      public static void main(String[] args) {
        ImageIcon i = new ImageIcon("C:/TestTree/closed.gif");
        JOptionPane p = new JOptionPane();
        p.setMessage("This JOptionPane has my icon");
        p.setMessageType(JOptionPane.QUESTION_MESSAGE);
        p.setOptionType(JOptionPane.YES_NO_CANCEL_OPTION);
        final JDialog d = p.createDialog("test");
        d.setIconImage(i.getImage());
        d.setVisible(true);
        d.setModal(true);
        if(Integer.parseInt(p.getValue().toString()) == JOptionPane.YES_OPTION) {
            System.out.println("You Clicked Yes");
    }

  • How to change the JFrame's titlebar's icon's context menu's font?

    Hi everyone.
    I want to know how to change the font of the text that appears in the context menu originated from right clicking at the icon that's all the way to the left in the titlebar of JFrames that use the default look and feel for decoration (JFrame.setDefaultLookAndFeelDecorated(true); // which uses the Metal L&F, Ocean theme).
    I searched around and found nothing. I thought that I could use what I learned at https://forums.oracle.com/message/9221826, but I couldn't come up with something that worked.
    Thanks in advance.t

    After some more messing around, I finally made it! I like Java so much that it makes me a bit sad how hard it is to do stuff like this. Anyway, I found a method here to recursively change the font of all components from a JFileChooser, but it doesn't work on the JPopupMenu (now I know the name) that pops up from the titlebar's icon. So I messed around with that method, used some casting, and was able to change the JMenuItems' font:
    public static void setSubComponentFont (Component comp[], Font font) {
        for (int x = 0; x < comp.length; x++) {
            if (comp[x] instanceof Container) {
                setSubComponentFont(((Container)comp[x]).getComponents(), font);
            try {
                //comp[x].setFont(font);
                if (comp[x].toString().contains("JMenu")) {
                    for (Component y : ((JMenu)comp[x]).getPopupMenu().getComponents()) {
                        if (y.toString().contains("JMenu")) {
                            y.setFont(font);
            } catch (Exception ex) {}
    I was inspired to use .toString().contains() by this thread.
    I also did this with nested loops, so the path to the menu items can be seen:
    for (Component a : frame.getLayeredPane().getComponents()) {
        System.out.println(a.toString());
        if (a.toString().contains("MetalTitlePane")) {
            for (Component b : ((Container)a).getComponents()) {
                System.out.println(b.toString());
                if (b.toString().contains("SystemMenuBar")) {
                    for (Component c : ((Container)b).getComponents()) {
                        System.out.println(c.toString());
                        for (Component d : ((JMenu)c).getPopupMenu().getComponents()) {
                            System.out.println(d.toString());
                            if (d.toString().contains("JMenu")) {
                                d.setFont(font);
    Every System.out.println() gives a hint to what should go on the following if condition, so they should be used one at a time. This doesn't work for the JFileChooser's title font though. When I have time I'll either look further into it or ask another question.
    So, if someone else needs it like I did, here it is. As a tip, System.out.println() and .toString() are your friends! That's how I learned what was contained in each object, and what path I needed to take to get to the objects of interest.
    Thanks anyway!

  • How to change the OraSSO login link in webcache/load balance

    Hi
    we have 10gAsR1 installed as a Portal instance. We have 6-server
    load balancer => webcache as loadbalancer (listening port 80)
    Wb ch1 and wb ch2 => webcache (listening port 7777)
    portal1 and portal2 => Portal listening 7778
    infra =>Infrastruture with repository Portal/Oracle SSO (listening 7777)
    This set up is working fine for our intranet setup, now we need to open this for couple of external clients. Well initially we need to open on the load balancer server on port 80 for external team to access, it works fine when we make it publc access.
    Now when we need to make it SSO (siteminder) enables, when users click on login link it first goes oracle sso then it internally redirects the page to site minder sso.
    Well, I have noted that the sso server details are mentioned in global setting sso/oid details. Since we need to open this for external client we have to add a DNS entry for this so that we can allow its access over firewall..
    Now I have made DNS name change at my infrserver level, now I need to update the change at the load balancer server (where wheb chache is running).
    Any one know how to chang the URL at load balancer.
    I am struck at this point please suggest how should i proceed..
    Thanks,

    Extract from Personalization Guide - Page Footer - Personalization Considerations
    * If you wish to personalize the URL that points to the Privacy Statement for a page that displays a standard Copyright and Privacy (that is, its Auto Footer property is set to true), set the Scope to OA Footer, in the Choose Personalization Context page of the Personalization UI.
    * If you wish to personalize the URL that points to the Privacy Statement for a page that displays a custom Copyright and Privacy (that is, its Auto Footer property is set to false), set the Scope to Page in the Choose Personalization Context page of the Personalization UI. In the following Page Hierarchy Personalization page , identify and personalize the Privacy page element.

  • How to change the privacy statement link url

    I looked into the previous threads , could not find the answer to "Changing the privacy statement url to clients privacy statement url".
    I am talking about the privacy statement URL in the page that user see it as soon as user logs into the e-business suite.
    I have read the previous theads and developers guide regading how to show or hide this autofooter thing. but could not find any thing about how to change the one in the login page.I even looked ino personalization but could not find a place to change this url. please HELP.
    Another question is " is it ok to show privacy statement in just the first page and hide it in rest of the application pages?"
    Thanks
    karan

    Extract from Personalization Guide - Page Footer - Personalization Considerations
    * If you wish to personalize the URL that points to the Privacy Statement for a page that displays a standard Copyright and Privacy (that is, its Auto Footer property is set to true), set the Scope to OA Footer, in the Choose Personalization Context page of the Personalization UI.
    * If you wish to personalize the URL that points to the Privacy Statement for a page that displays a custom Copyright and Privacy (that is, its Auto Footer property is set to false), set the Scope to Page in the Choose Personalization Context page of the Personalization UI. In the following Page Hierarchy Personalization page , identify and personalize the Privacy page element.

  • How to change the default apex port

    hi,
    i am installed apex4.0 in EBS R12 DB with HTTP Server method. my apex is running from application server 10g and default port is 7777.
    URl: http://hostname:7777/pls/apex
    My EBS R12 running on http://hostname:8007.
    is it possible to change the apex port to EBS Apache port(8007) in R12 and finally i want to change above URL like this
    Before change : http://hostname:7777/pls/apex
    After Change : http://hostname:8007/pls/apex
    Thanks in advanace....

    How to Change the Default SSH Port from Terminal ?
    now showing default SSH Port 22 i need change it pls help me how can do

  • How to change the default Path of Prompt Played by MicroApp

    Hi
    I need to store all the Self Service application prompts in dedicated Media Server. I can modify location of all the Media files by passing the related URL form CVP application, however I need to know how to change the default location of Prompt file played by Play Media Microapplication in ICM Scripting.
    Currently the default location taken by Play Media Micro App is the Media _Server.variable path set for VXML Server location while I have a separate Media Server.
    Please advice how we can customize the MicroApp Media path.
    regards
    Kapil Kumar

    Hi Kapil,
    Try this in your ICM script, define set variables i.e.
    set Media Server= ip address of media server
    set Locale = en-us
    set input Type = DTMF only
    set App Media Lib = " you new location i.e. test "
    So, the application path will be
    http://media server ip address/en-us/test
    hope this helps.
    Cheers

  • How to change the default SSH port on Cat 6500 WS-SUP720-3B

    I have been net searching this question and I find answers relative to other Cisco products but not for the 6500 series. We are running
    entservicesk9_wan-mz.122-18.SXF17a.bin and would like to know how to change the default SSH listening port..
    Thanks in advance..

    Hi Neil,
    Normally this is achieved via the "ip ssh port rotary " but unfortunately, this command is not implemented on your platform so ssh will only work on port 22.
    Regards,
    Nicolas

  • How to change the Default login script and the USER login script in Netware3.12

    I need to cut down the disk map from Neware 3.12 in Win98 client's PC.
    please tell me
    how to change the Default login script and the USER login script in
    Netware3.12 ?
    Or is there any other ways to do this thing?
    Thanks a lot!

    On 4/6/2006 [email protected] wrote:
    > how to change the Default login script and the USER login script in
    > Netware3.12 ?
    Please repost in the discontinued.forums.
    Edison Ortiz
    Novell Product Support Forum SysOp
    (No Email Support, Thanks !)

  • How to change the default database charset to ISO8859-1?

    Hi all,
    I have created a table with a nvarchar field to store string, may i now how to change the default NLS charset to ISO88591 charset?
    Thanks in advance.
    chin.

    Thank you!
    I will try later!
    But,who can tell me more detail !
    thx

  • How to change the default time?

    when you finish the action of dialing ,the CCM system recognize your finish after 10s .How to change the default time in Service Parameters ,which is the detail Parameters ?

    Please see the following link for information on configuring the interdigit timeout.
    http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_tech_note09186a00800dab26.shtml
    Hope this helps. If so, please rate the post.
    Brandon

  • How to change the default currency in CJ32 and CJ33

    Dear all,
    As required by the user, I want to know how to change the default currency from controlling area currency to object currency in TCODE CJ32 and CJ33. Currently, the controlling area currency will be defaulted in the field "Views in".
    Could any one help me? Points will be awarded.
    Thank you.
    Christina.
    Edited by: Virendra Pal on May 5, 2010 8:34 AM

    Hi Christiana ,
    Once you are in tcode CJ30 / CJ32 , Enter either Project definition or WBS element and this shall take you to the Budget screen and once you are here you can find a drop down with two options .One is Controlling are currency and the other one is Object currency.
    Since the Currency is set to Object currency in OPS9, System shall allow the budget values in Object currency and if the user wants to see the same values in Controlling are currency ,then the user needs to view the values in Controlling are currency using the drop down .
    Regards
    Judy

  • How to change the default "Safe" files in Safari?

    I would really appreciate if anybody could teach me how to change the default "Safe" files using AppleScripts, Folder Actions or .plist files. I really would like to have some files to open automatically after download, specially .pps files, and safari doesn't recognize such files as "safe". I tried to find out reading the help files but got lost.
    I posted a reply in an old topic for somebody who seemed to know, but it was not related to that topic, so I decided to open a new one.
    I'll be gratefull for any help. Thanks.

    Hi MDRC,
    Have a read of [this topic|http://discussions.apple.com/thread.jspa?threadID=1237961] to see if that helps.

  • How to change the default window size display font size on Lync 2013 main window?

    Hi champs,
    Just a simple non-technical question: How to change the default window size display font size on Lync 2013 main window on Windows 7 desktop?
    Thanks,

    Hi,
    Did you mean change the Lync: Change the Default Font and Color of Instant Messages just as Edwin said above?
    If not, as I know, there is no natural way to change it.
    If yes, on the latest version of Lync 2013 client, there is a new option “IM” on Lync client “Options” list. And you need to change the default Font and Color of IM in the interface of “IM”.
    Best Regards,
    Eason Huang
    Eason Huang
    TechNet Community Support

Maybe you are looking for

  • How do I get the scrolling bar to stop popping up when I'm connected to the iTunes Store? It wont allow me to type in the search bar when it pops up.

    When I am connected to the iTunes Store a scrolling bar pops up which says "accessing itunes store" even though I'm connected.  It pops up every time i try to type a letter in the search bar, not allowing me to type.  I can type 1 letter in then it p

  • Double payment charged

    I just purchased battery saver app on my torch 9860 through my credit card worth rs. 100 indian rupees. And I had to add my credit card details in blackberry world for that purpose, my problem is that there were two amounts deducted 103 and 100 respe

  • Task is overdue in Task List - Task not active

    Hello together, in our Solution Manager are several tasks in one system which are overdue but not active. So, after I've done all tasks i can't check the system as done. Which Job is responsive for updating the task list, or how can i reset the task

  • OracleXMLQuery not found

    I am trying to run the sql utility for XML and I get this error. File c:\OracleXML1\OracleXSU111\lib\oracle\xml\sql\query\OracleXMLQuery.class does not contain type OracleXSU111.lib.oracle.xml.sql.query.OracleXMLQuery as expected but type oracle.xml.

  • Is Safari's Motto: Not Responding

    Safari is practically unuseable on my machine. Two or three or four times a day I have to force quit because it's "not responding." My version is the latest with all the updates and it is just as unstable as it can be. Does anyone have any suggestion