Question about How to Use Custom CellEditors

Hi:
I have been trying to implement something like this: I have a JPanel, and when you double-click a particular spot on it, I want a textbox to appear. Currently, I am implementing it by using an undecorated JDialog that contains a JTextField in it (such that the text field occupies all the space in the dialog, i.e. you can't even tell that there is a dialog). This seems like a hack to me.
Another alternative that I have been thinking about is using layered panes, and hiding the textfield below the jpanel, and only bringing it to the front when the user double-clicks.
Then, I stumbled onto custom celleditors. Now, it seems that everyone is using them in JTables, JLists, JComboBoxes, etc. and I was wondering if it is something that I can use with a JPanel.
Can anyone comment on the implementations I am considering, as well as using custom celleditors with a JPanel?
Thanks in advance,
LordKelvan

Still don't understand your requirement. Does the text field stay there or disappear after the data is entered? If it disappears, then how do you change the value, do you have to click on the exact same pixel again?
Maybe you could use a MouseListener and then display a JOptionPane or JDialog to prompt for the information. Or if you want to display a JTextField then add a JTextField to the panel and then when the user enters the data by using the enter key or by clicking elsewhere on the GUI you remove the text field from the panel.

Similar Messages

  • Question about: "How to Use Layers in Elements 2.0"

    I have gone over the tutorial "Harness the Power of Layers" and I can not figure out how to open the example the tutorial is showing me. It says: Open the "start.psd" file in the Tutorials folder located inside the Adobe Photoshop Elements Application folder and a wooden doll appears and instructs you how to add the accessories.(hat, bag, shadow, etc.)
    Where do I find or open "start.psd" and the doll with the accessories? Also, is there online instructions that show or animate the steps involved in "layers" using Elements 2.0, which I'd pay for. Thank you, Robert

    Chris, I know this is simple, but I'm having a mental block :-(
    Are you saying go to "My Computer" where I find "C:Program Files/Adobe/Photoshop Element 2/Tutorials ? I can open Adobe Photoshop Elements. I just can't find "start.psd" in the tutorials link... Can you explain it another way ? Thanks
    oh, sorry, yes I'm running Windows XP, 1.5 RAM

  • Question about how HP handles customer service issues

    I am the owner of three HP laptops.  Two of which are dead now due to the defective Nvidia chips they contained.  When I called HP to report this issue, I was told by numerous HP customer service reps that they were not aware of any issues with the Nvidia GPU or that there had not been a high number of recorded problems concerning this.  It has been proven in numerous documents made public recently that this defect was known about and there had been a high frequency of this issue.   I would like to know why I was told these falsehoods and treated the way I was?
    I subsequently decided to dismantle one of the computer to investigate the GPU.  Sure enough the epoxy that reinforces the BGA solder-joint was cracked in the chip was no longer making good electrical contact with the PCB.  What I found really perplexing was the 1/4" gap between the GPU and the copper heat-sink that was intended to provide cooling.  I would assume HP was responsible for the cooling and chassis design?  I would also assume it as HP who filled this GAP will thermal foam.  Please correct me if I am wrong.  

    The recall was for certain models, did you confirm that your model was one of them?
    ________________________________________________________________________________________________________ I Love Kudos! If you feel my post has helped you please click the White Kudos! Star just below my name
    If you feel my answer has fixed your problem please click 'Mark As Solution' and make it easier for others to find help quickly

  • How shall i do it ? Complex question about how to use the airport express or time capsule ?

    Hello All,
    Right now i have an access point:
    1/ A mercury router (cheap and old)
    2/ Airport Express
    Do you advice me to use it to replace my cheap old router (mercury) or to pair it with this main old router ? (however i tried to without any success)
    3/ Time Capsule
    Can i use it to relay the signal from the Airport Express to extend the range  of the wifi?
    Can i use it to stream music to my B/W M1 speakers directly ? (I will connect by USB the BW M1 to the time capsule) and would like to be able to play music this way. Is this in anyway possible ?
    Many thanks for your reply !

    ok, i might be wrong but here goes:
    you should attach your modem to your time capsule: your time capsule will act as not only your time machine but also your main wireless transmitter.
    you set it up using "Airport Utility" which is inside the "utilites" folder, which is inside your applications folder.
    this connects your mac wirelessly to the internet.
    to stream music to your speakers you then set up the airport plug to (a) join the existing network (which you set up on the time capsule) and then (b) set it up to stream music to your speakers. again, this is done using "airport utility". do it AFTER you have set up the time capsule.
    you will then be able to use itunes to stream music to your speakers. from itunes on your computer you will be able to chose from the bottom right hand side of the window whether you play the music on your computer or wirelessly into your B+W speakers...
    some notes:
    1. you won't be able to connect the airport plug by USB to your speakers as the airport plug doesn't have a USB output. It has only analogue and optical.
    2. although your time capsule has USB you cannot stream music into it or through it. there's some basic guidance here:
    http://www.apple.com/wifi/
    3. you may find that the sound quality [if you are playing apple lossless files or wav files) isn't as good as if the speakers were connected directly to your mac via USB.  this should be especially noticable because your speakers are so good!
    if the music you play is only mp3 or the stuff purchased from itunes then it shouldn't make too much of a difference.
    4. keep an eye out on the B+W website: there may come a time when you won't even have to use the airport plug, and you will be able to stream music straight to the speakers. i know that B+W have just done that with the new Zepellin speaker that they make.
    hope this helps...

  • One question about how to use JFrame

    Hello friends,
    I use a JFrame to show one webpage, I want to follow a link in this page by a new window, but when I used it, I find, each time I create a new window to follow a link, the old window will be nothing, what should I do?
    Thanks in advance!
    See the following codes:
    import javax.swing.text.*;
    import javax.swing.*;
    import java.net.*;
    import java.io.*;
    import java.awt.*;
    public class SimpleWebBrowser {
    public static void main(String[] args) {
    // get the first URL
    String initialPage = "http://www.yahoo.com";
    if (args.length > 0) initialPage = args[0];
    // set up the editor pane
    JEditorPane jep = new JEditorPane();
    jep.setEditable(false);
    jep.addHyperlinkListener(new LinkFollower(jep));
    try {
    jep.setPage(initialPage);
    catch (IOException e) {
    System.err.println("Usage: java SimpleWebBrowser url");
    System.err.println(e);
    System.exit(-1);
    // set up the window
    JScrollPane scrollPane = new JScrollPane(jep);
    JFrame f = new JFrame("Simple Web Browser");
    f.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    f.getContentPane().add(scrollPane);
    f.setSize(512, 342);
    f.show();
    import javax.swing.*;
    import javax.swing.event.*;
    public class LinkFollower implements HyperlinkListener {
    private JEditorPane pane;
    private JScrollPane window;
    public LinkFollower(JEditorPane pane) {      
    this.pane = pane;
    public void hyperlinkUpdate(HyperlinkEvent evt) {
    if (evt.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
    try {
         pane.setPage(evt.getURL());
         window = new JScrollPane(pane);
         JFrame.setDefaultLookAndFeelDecorated(true);
    JFrame t = new JFrame();
    t.getContentPane().add(window);
         t.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
    t.setSize(800, 600);
    t.show();
    catch (Exception e) {       

    the old window will be nothingBecause you abandon the old frame.
    Use it forever.
    Beware: Java HTML rendering framework is almost endlessly incomplete. You shouldnIt implement real browser with them.
    See Q6.3.2 - Q6.3.6 of this FAQ:
    http://groups.google.com/groups?hl=en&lr=&selm=cjr8er%24oo0%241%40newstree.wise.edt.ericsson.se&rnum=37

  • Design question about when to use inner classes for models

    This is a general design question about when to use inner classes or separate classes when dealing with table models and such. Typically I'd want to have everything related to a table within one classes, but looking at some tutorials that teach how to add a button to a table I'm finding that you have to implement quite a sophisticated tablemodel which, if nothing else, is somewhat unweildy to put as an inner class.
    The tutorial I'm following in particular is this one:
    http://www.devx.com/getHelpOn/10MinuteSolution/20425
    I was just wondering if somebody can give me their personal opinion as to when they would place that abstracttablemodel into a separate class and when they would just have it as an inner class. I guess re-usability is one consideration, but just wanted to get some good design suggestions.

    It's funny that you mention that because I was comparing how the example I linked to above creates a usable button in the table and how you implemented it in another thread where you used a ButtonColumn object. I was trying to compare both implementations, but being a newbie at this, they seemed entirely different from each other. The way I understand it with the example above is that it creates a TableRenderer which should be able to render any component object, then it sets the defaultRenderer to the default and JButton.Class' renderer to that custom renderer. I don't totally understand your design in the thread
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=680674
    quite yet, but it's implemented in quite a bit different way. Like I was saying the buttonClass that you created seem to be creating an object of which function I don't quite see. It looks more like a method, but I'm still trying to see how you did it, since it obviously worked.
    Man adding a button to a table is much more difficult than I imagined.
    Message was edited by:
    deadseasquirrels

  • How to use custom control.

    hi all,
        how to use custom controls in screen painter.
    can i add image to my screen  using custom control.
    is there any other way to display image on screen.
    give me some notes about custom control.
    and sample programs to display image and also the use of custom control.
    regards,
    bhaskar.

    hi vinod,
    u can use the class <b>cl_gui_picture</b> to work around with pictures on the screen
    just define a custom control on the screen
    create an object of custom container.
    create another object of cl_gui_picture giving container name as the parent name...
    u can check out the class using the transn se24....
    pls post if additional info is required...
    Regards,
    Vs

  • Hello! I have a huge question about how can I get connected my iphone 4 with my car Is there any opption on find my car application? I have a Volvo xc60 and I want to be connected all the time with my iphone. Can I do that?

    Hello! I have a huge question about how can I get connected my iphone 4 with my car Is there any opption on find my car application? I have a Volvo xc60 and I want to be connected all the time with my iphone. Can I do that?

    Hello. I can say that you have a quite strange „huge question”… It’s non-sense to stay connected with your car which is hundreds miles away. Unless…
    I have a theory. You don’t want to controll your car, you want to controll somebody who is driving the car. Volvo XC 60 is a nice family car, usually used by married men between age of 35-45, probably with small children, so it’s very unlikely that you want to controll your teanage kid, mainly because probably even if you would give him/her to drive the car in the neighborhoud, I don’t think that he/she would be „several hundred miles away”…  If your child is not young teneage anymore, and he/she has his/her own life, but you want to control him/her, that is sick… So I am convinced that you want to controll your husband who probably travelling often! Am I wright?
    Isnt’t nice at all! Would you like if you would be monitorized in such way? I bet you don’t!
    Anyway, iPhone is smart, you can use for many things, but come on, you really were thinking that there is such kind of application???
    What could you do it's to put in the car a GPS survelling system, however I don't think that you could do it without your husband knowledge, otherwise he won't be able to start the engine...

  • HOW TO: using custom fonts in native storyboard views from an ANE on iOS

    Hey,
      In our apps, we have embedded storyboards into an ANE, and successfully used those screens in an AIR app, and figured out how to use custom fonts in those views.
      I wrote a quick blog post about it and just thought I'd share it real quick in case it helps someone.
    ANE for iOS with Custom Framework – Using Custom Fonts | khef.co

    Hi WayHsieh,
    >>can I just "install" fonts through Word App? Does Word Apps have enough privilege to install fonts on Windows? Can I just click a button in Word App, and then it will install fonts automatically?<<
    Based on my understanding, it is hard to achieve the goal. Because the app webpage is hosted inside an Internet Explorer control which, in turn, is hosted inside an app runtime process that provides security and performance isolation and it is under
    low-Integrity level.
    Here is the figure for apps for Office runtime environment in Windows-based desktop and tablet clients:
    You can get more detail about Privacy and security from links below:
    Privacy and security for apps for Office
    Hope it is helpful.
    Regards & Fei
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • A few questions about how ZPM works.

    We have patch management (in ZCM 11.2.2), but honestly don't use it much. I have a few questions about how it works that might make me use it more, if I understand it more.
    If I deploy a patch (or a set of patches), it creates a bundle for that deployment. That bundle seems to include actions that deploy the actual patch bundles (correct?). Do I have to recreate a new deployment bundle every time I want to push a new patch? i.e. If I push a Java update, and a month later, a new one comes out, do I build out a new bundle with the new patch in it, or do I modify the old one?
    Once the patch is deployed, can I safely delete that deployment bundle, or should they just pile up?
    Is there a way to "auto-approve" patches? Lets say I always want a group of machines to have the latest Adobe Flash Player patches. Can I set up ZPM to automatically cache and push the latest patches for a specific product, or do I have to manually remediate each patch? (I'm thinking of how MS's WSUS does "auto-approval")
    I see most packages aren't cached in list, but occasionally, a patch is cached without me touching it. Why? Can I change what gets automatically cached?
    Thanks for any help/answers you can provide.
    -Adam

    Originally Posted by adrockk
    We have patch management (in ZCM 11.2.2), but honestly don't use it much. I have a few questions about how it works that might make me use it more, if I understand it more.
    If I deploy a patch (or a set of patches), it creates a bundle for that deployment. That bundle seems to include actions that deploy the actual patch bundles (correct?). Do I have to recreate a new deployment bundle every time I want to push a new patch? i.e. If I push a Java update, and a month later, a new one comes out, do I build out a new bundle with the new patch in it, or do I modify the old one?
    Once the patch is deployed, can I safely delete that deployment bundle, or should they just pile up?
    Is there a way to "auto-approve" patches? Lets say I always want a group of machines to have the latest Adobe Flash Player patches. Can I set up ZPM to automatically cache and push the latest patches for a specific product, or do I have to manually remediate each patch? (I'm thinking of how MS's WSUS does "auto-approval")
    I see most packages aren't cached in list, but occasionally, a patch is cached without me touching it. Why? Can I change what gets automatically cached?
    Thanks for any help/answers you can provide.
    -Adam
    For #1, (assuming you're not using baselines), you would check the new version of the patch (vulnerability) and do a new deployment.
    #2 - once you're satisified that the machines are deployed (or the best to your ability) you can delete the DEPLOYMENT package. It doesn't delete the actual vulnerability bundles to my knowledge. That's why it's a good idea to name your bundle deployments with something meaningful, IMO (and maybe include a nice desription).
    #3 - currently I don't believe this is possible. I know you can probably configure it to auto-download the patches, but not auto-deploy everything. Given the propensity for software to wreck other things (hello MS .NET patches), this is probably not a good idea. At least I'd never auto-download and auto-deploy any patches without testing them first, and certainly take my servers a little more cautiously than my workstations.
    #4 - I think you can configure what's cached, but I could be wrong.
    I know there's a lot of improvements coming in the pipeline, and it doesn't hurt to "vote" for your enhancements via the enhancement system (more work for Shaun--haha)
    --Kevin

  • HT1695 I know nothing about how to use my new ipod and when reading the little bit of information in the folder that came with it, all I can do is turn it on, but it just powers down after a few seconds.  How do I work this thing?

    I know nothing about how to use my new ipod and when reading the little information that came with it, all I can do is turn it on.  Then in a few seconds it goes black, never having brought up a screen to do anything!  Help!  What do I do to get this thing going?

    You might consider connecting it to the charger and charging up the battery overnight.
    Please Get the iPod Touch User Manual for iOS 5

  • HT1208 Where do I find a tutorial about how to use the new iTunes? I have version 11.1.3 (8). I looked on the Apple web site but only found info extolling the virtues of iTunes, not how to use it.

    Where do I find a tutorial about how to use the new iTunes? I have version 11.1.3 (8). I looked on the Apple web site but only found info extolling the virtues of iTunes, not how to use it.

    Use it the same way as previously.
    ctrl B shows the menus.
    ctrl S shows the sidebar.
    What else do you need help with?

  • How to use custom component configuration

    Hi Experts,
    For a standard webdynpro object I have created a new z component configuration by copying from existing one. In the standard there are already 2 existing component configuration.
    This webdynpro does not have any application created so I am not able to directly assign this component configuration.
    During run time in portal when I view the properties I can see a application for this webdynpro component and the standard component configuration being used.
    My question is how to use the z component configuration I have created in the webdynpro?

    Hi Srinivas
    I researched your problem. I hope the below code helps you. You could add the below code to wddoinit.
    DATA:  lo_api_controller       TYPE REF TO if_wd_component,
              lo_pers_manager      TYPE REF TO if_wd_personalization,
              ls_config_key           TYPE wdy_config_key.
               lo_api_controller = wd_comp_controller->wd_get_api( ).
               lo_pers_manager = lo_api_controller->get_personalization_manager( ).
                     ls_config_key-config_id = 'ZTEST' .
                     lo_pers_manager->load_config_by_key( ls_config_key ).
    Regards
    Lorraine

  • How to use custome tag lib in the JSP page?

    How to use custome tag lib in the JSP page?...with JDeveloper

    http://www.oracle.com/webapps/online-help/jdeveloper/10.1.2/state/content/navId.4/navSetId._/vtTopicFile.working_with_jsp_pages%7Cjsp_ptagsregistering~html/

  • How to use custom tag in jsp

    sir
    plz tell me how to use custom tag in jsp.plz describe it.
    i will be thankful to u

    Do you want to use taglibs or develop custom tags? Either way take a look at these:
    http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags.html
    http://www.stardeveloper.com/articles/display.html?article=2001081301&page=1
    http://www.onjava.com/pub/a/onjava/2000/12/15/jsp_custom_tags.html
    http://jakarta.apache.org/taglibs/tutorial.html
    http://www.ibm.com/developerworks/edu/j-dw-java-custom-i.html
    http://www.herongyang.com/jsp/tag.html

Maybe you are looking for

  • Connection to a nokia 6288

    Hello, This is not exactly a question about iSync but there are other nokia-problems here, so I give it a go: I just bought a nokia 6288, but I can't connect it to my iMac G5 (no bluetooth) with the usb-cable , (with bluetooth to a mpb works fine). W

  • Material field Inactive

    In ME21N, purchase order creation, after enteriang all details material etc. when enter key pressed, material field becomes inactive. But the order is created and saved. Material entry also created in table EKPO. This occurs only when Document Type i

  • Plot to different layers in Origin

    Hi everyone, I'm trying to figure out how to plot data I collect in Labview to graphs in Origin.  My real program collects 5 columns of data and sends it to a new workbook in Origin.  My problem is with plotting columns to separate layers.  I attache

  • Forefront Endpoint Protection Monitoring Service

    Hello, I just saw that the Forefront Endpoint Protection Monitoring Service is stoppable. I had a virus a few weeks ago on my machine at home that has security essential installed. The virus continually disabled the service. Does it make sense to con

  • What are the reporting options

    hi what are the reporting options