Urgent--"JoptionPane"-to add keylistener

I have a problem regarding the key listeners added to joptionpane.
whether we can add key listeners to joptionpane.and if so how???
second poblem:
when joptionpane with confirmdoaolig box with 3 options is shown then it has yes and no option with their Y and N initials unserlined , i
wamt that it shud not be shown underlined plus whenever i press alt key it shud show underlined initials.
thanks in advance

extends the defaultcellrenderer make it return a Jbutton as the component to draw.
class OverCellRendererClass extends DefaultTableCellRenderer {
public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
//put your stuff here to make or get a button
return myButton;
Use something like this to set the renderer for the column :
tb.getColumnModel().getColumn(4).setCellRenderer(new YourCellRendererClass());

Similar Messages

  • Urgent - How to add a new control instead of tabs in JTabbedPane

    Hi,
    Please give me an idea or a sample program for how to add a new control
    in JTabbedpane instead of tabs that means overlay any Java controls or pane
    in the tabpane empty place next to tabs

    "Urgent" is not relevant to the question. Your question is no more important than anybody elses.
    My answer in this posting show a limited solution:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=636289
    Otherwise I suggest you try using a layered pane approach:
    http://java.sun.com/docs/books/tutorial/uiswing/components/layeredpane.html

  • URGENT : How to add spaces in the outbound file

    Hi Gurus,
    I am writing data from SAP to a Unix file via an ABAP program.
    The file has one record with 4000 characters with 2000 spaces in between the datas.
    Is there any command to add these spaces ? Or I have to go through a loop to add them ? I cannot leave them and assume that they will be spaces by default,as this is causing some error in Unix side.
    Please help,this is urgent.
    Regards,
    Sandip.

    heyy i could find the solution to it....so am closing the thread..thanksss

  • Urgent: How to add BEx Reports to Role

    Dear all,
    I have created BEx reports and they are present in INFOAREA tab in Query Designer and Analyser.
    Now I want to assign these reports to Role area. I have tried thru tcode PFCG but couldn't find the solution.
    Please help me in finding the solution. Its urgent.
    Thanks in advance.
    Vinod.

    hi Vinod,
    check
    add query in role
    you can try,
    in PFCG, click '+other', choose 'bw query url', in next screen give description for text and object description =
    <bsp_protcl>://<bsp_server>/sap/bw/BEx?sap-language=<language>&bsplanguage=EN&cmd=ldoc&INFOCUBE=infocubename&QUERY=querytechnicalname
    or open Query Designer, find your query,
    before open the query click button “Enter in Role”.
    select role/folder in which you want to put the query
    hope this helps.

  • How can I add KeyListener to JTable editor

    Hi, I want to know how can I add a KeyListener to a JTable editor?
    I want to capture the event when any of the cell in the jtable has a key typed.

    If your goal is to check the entered value, it's more elegant to do this in overriding
    DefaultCellEditor#stopCellEditing and return false when the value is not correct.
    Example from a DateEditor:
            @Override public boolean stopCellEditing() {
                String value = ((JTextField)getComponent()).getText();
                if(!value.equals("")) {
                    try {
                        formatterE.parse(value);
                    } catch (ParseException e) {
                        ((JComponent)getComponent()).setBorder(new LineBorder(Color.red));
                        return false;
                return super.stopCellEditing();
            }

  • Unable to add Keylistener to Label component

    Here is the class...all I want to do is make it display an Image in label. I should be able to capture keystrokes.....while pointing any where on the image. it seems to capture the mouse events but key events. Any ideas
    <code>
    import java.awt.Image;
    import java.io.File;
    import javax.imageio.ImageIO;
    import javax.swing.ImageIcon;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import java.awt.BorderLayout;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    public class ITest {
         public static JLabel label ;
         public static JFrame frame;
         public static void main(String[] args) {
              Image image = null;
              File file = new File("c:/temp/sanjay.GIF");
              String t= Constants.WEB_ROOT;
              System.out.println(t);
              try{
              image = ImageIO.read(file);
              } catch (Exception e){
              frame = new JFrame();
              label = new JLabel(new ImageIcon(image));
              label.addKeyListener(new KeyListener(){
         public void keyReleased(KeyEvent e)
              String s2 = ""+ e.getKeyChar();
              System.out.print(s2 + "keyReleased");
         public void keyPressed(KeyEvent e)
              String s2 = ""+ e.getKeyChar();
              System.out.print(s2 + "keyPressed");
         public void keyTyped(KeyEvent e)
              String s2 = ""+ e.getKeyChar();
              System.out.print(s2 + "keyTyped");
                   frame.getContentPane().add(label, BorderLayout.CENTER);
                   frame.pack();
                   frame.setVisible(true);
    </code>

    Nvr mind ...It worked once I set this
    label.setFocusable(true);
    label.requestFocusInWindow();

  • JComboBox cann't add KeyListener? Why?

    There is a fragment:
    JComboBox cBox = new JComboBox();
    cBox..setEditable(true);
    cBox.addKeyListener(new KeyAdapter(){
                   @Override
                   public void keyPressed(KeyEvent e) {
                        System.out.println(e.getKeyChar());
    Whatever I press which key,the console print nothing,why?
    And I want to restrict the user's input through this way,any better ideas?
    thanks for ur help!

    For an editable JComboBox, you need to add the KeyListener to the editor component, something like this:
    comboBox.getEditor().getEditorComponent().addKeyListener(...)
    And I want to restrict the user's input through this way,any better ideas?Have a look at the Swing tutorial on [url http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html#filter]Implementing a Document Filter. Next, get the editor component for the JComboBox (which is a JTextField), and add the Document Filter to it.

  • PLz Help me its urgent, how to add new field in mm01 basic data screen

    Hi everyone,
         plz tell me how to add new field in mm01 basic data screen,i added that field in basic data screen but when i create a material the data for that field will not save in database table.
    Thanks,
    murali.

    Hi Murali,
    when created added a field on the screen by using user exit then after that you have add the field in main table where you will be getting these table in the userexit only, please make sure about this. And i am sure defenitly it will get updated in to the table.
    reward if useful.
    thanks
    abdulsamee.

  • Urgent - How to add pdf files to template document in multiple sessions?

    Hi, forum!
    VERY new to using Adobe Acrobat 7.0 Professional, so I am reaching out for help.
    We have a "template" document with pre-assigned bookmarks.  I need to add multiple PDF files into it, either by inserting pages, adding the complete PDF, and/or extracting pages, then assigning the locations to each individual bookmark.
    The ending page count will be about 300 pages, and there is no way that I can create the complete document in one day or one session.
    A) What is the best way to add pages from multiple PDF files into this "template" document?
    B)  Is there a way to add pages in one session, save it out, then add additional pages to the same output document on a different day, etc., without having to "re-add" the previous pages and until I am done and ready to finalize the document?
    I would really appreciate a fast response, as my new job kind of depends upon me doing this well...
    Thanks and Merry Christmas!

    Thanks, George!
    I will try your suggestion.
    While waiting for a response, I ran into another problem:
    Some of the PDF documents I am to work from are "protected," meaning I can read them but not extract any pages or click to add them to a list of files to import...but I need to extract some or all pages from it.  Any suggestions on this?
    Thanks!

  • URGENT -- Printing reports adds extra spaces in between pages

    Hello Experts,
    I would like to ask for your help regarding printing from concurrent requests.
    I am currently having an issue with printing multiple pages from Oracle reports, both in text format and RTF/PDF formats.
    When I generate a multiple page report and print it directly from a concurrent request, print outs generate extra space after each page even though page size is indicated in the reports (all of them are in letter size).
    I have already tried editing the printer drivers both the actual driver config file and through the application but the results are still the same.
    This is very important since printing is done on continuous paper and continuous pre-printed forms
    Any ideas would be greatly appreciated.
    Regards,
    Jovelyn

    Please post the details of the application release, database version and OS.
    I would like to ask for your help regarding printing from concurrent requests.
    I am currently having an issue with printing multiple pages from Oracle reports, both in text format and RTF/PDF formats.
    When I generate a multiple page report and print it directly from a concurrent request, print outs generate extra space after each page even though page size is indicated in the reports (all of them are in letter size).What if you print the output file from the OS, can you reproduce the issue then?
    Troubleshooting (Printing) [ID 104528.1]
    An Extra Empty Page Is Printed at the End of Requests Output [ID 1011499.7]
    I have already tried editing the printer drivers both the actual driver config file and through the application but the results are still the same.Can you reproduce the issue with other printers?
    This is very important since printing is done on continuous paper and continuous pre-printed forms
    Any ideas would be greatly appreciated.If the issue is urgent, please log a SR.
    Thanks,
    Hussein

  • URGENT ::: How to add UserName Token to SOAP Message Header.

    Hi,
    I created a webservice client using CLIENTGEN utility of weblogic from the WSDL file. When I am trying to call a webservice which is hosted on TOMCAT server, I am getting the following exception::
    5/12/2008 06:09:02 com.sun.xml.wss.impl.filter.DumpFilter process
    INFO: ==== Sending Message Start ====
    <?xml version="1.0" encoding="UTF-8"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
    instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns0="http://settlementService.au.db.com/types">
    <env:Body>
    <env:Fault>
    <faultcode xmlns:ans1="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">ans1:FailedAuthentication</faultcode>
    <faultstring>Message does not conform to configured policy [ AuthenticationTokenPolicy  ]: No Security Header found</faultstring>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    ==== Sending Message End ====
    The webservice ic configured as secured webservice, there is some certificate file which was provided to me from client. Useing java KEYTOOL command I have created the keystore from that certificate and configure it in the weblogic server console.
    Issue is the SOAP message header is blank I need to add the USERNAME TOken profile to this header, in order to access this webservice. The current CLIENT code snippet is shown below:
              try{
                   String WSDLUrl = "https://shappzu2.au.db.com:8297/settlementService-ws/settlementService?WSDL";
                   String wsUserName = "tracer-us";
                   String wsPassword = "R0na!do#11";
                   InputStream[] policies = new InputStream[]{Client.class.getResourceAsStream("/wl-unt-policy.xml")};
                   SettlementService_Impl settlementServiceObj = new SettlementService_Impl(WSDLUrl);
                   SettlementServiceFacade port = settlementServiceObj.getSettlementServiceFacadePort(policies, policies);               
                   List credProviders = new ArrayList();
                   CredentialProvider cp = new ClientUNTCredentialProvider(wsUserName.getBytes(), wsPassword.getBytes());
              credProviders.add(cp);
              Stub stub = (Stub)port;
              // Set stub property to point to list of credential providers
              stub._setProperty(WSSecurityContext.CREDENTIAL_PROVIDER_LIST, credProviders);
                   if(sharesXMLString != null && sharesXMLString.length() > 0) {
                        port.loadEquityTrade(sharesXMLString);
              }catch(Exception e){
                   //throw new SystemException(e.getMessage());
                   e.printStackTrace();
    Can any one help me in this?

    1) Use something like TCPmon https://tcpmon.dev.java.net/ or verbose logging to see the actual message content on the wire that the client is sending
    2) Inside the WLS samples there is a UNT sample in the INSTALL_DIR/wlserver_10.0(or equivalent)/samples/server/examples/src/examples/webservices/security_jws
    If that works correctly and puts the UNT in the header, then I would compare that code with yours.

  • Urgent:Need to add Timeout for getting connection

    All,
    While using DriverManager.getConnection to get the connection,I need to add Timeout in my code so if I don't get a connection with in 30 seconds,I need to say'Operation Timed out.
    I was using DriverManager Api's setLoginTimeout method to set the desired time but it doesn't work.Can somebody tell me some other way to do it.

    If I use this method then if second thread reports
    Timed out after 30 seconds and then origional thread
    gets connection after 30 seconds then it'll also
    report.I dont want a connection if 30 second time
    passes.I think if second thread reports 'timed out'
    then I won't be able to explicitly kill the origional
    thread as stop method is deprecated in Thread
    class.Can you make it clear please?You can't stop the actual thread attempting the connection.
    It will require some thought on your part to correctly wrap it.
    It might not work at all because the getConnection() method, or something in it, might be synchronized.

  • Urgent how to add the transactions created in se63 to tranport request???

    I have maintained the translations for my smartform in se63 i want to attach the translation to a transport request.Can you help me out in this...
    it is very urgent.

    Hi
    When you save this , it should prompt you for a request
    In this way you can save it to a request and then trasnport it.
    If it is not prompting for a request , make sure you are assigning it properly and not to any local $TMP class or package.
    and also check for your user and then make sure your corrections are saved.
    I guess this might help.
    Regards,
    Chithra.

  • Urgent: How to add event listeners to a null object?

    I have an object that is lazy loaded, and therefore starts out null.
    How can I add an event listener onto this null object, so that it fires whenever the object is instantiated?
    WHY does arrayCollection.addEventListener(CollectionEvent.COLLECTION_CHANGED, function) not work??
    Thanks!
    C

    C,
    the answer to your question "WHY does arrayCollection.addEventListener(CollectionEvent.COLLECTION_CHANGED, function) not work??" is that addEventListener is not a static method, ie it has to be attached to an actual instance. I agree that in your situation it would be handy to have it as static, something like ArrayCollection.addEventListener(etc) but I'm not at all sure that is a good plan in general, as usually we want events to fire from an actual instance of the class, not generically. A quick look through the adobe docs has convinced me there are not many static methods at all, and none that appear to help you.
    I take it from your description that you don't know exactly when the collection is instantiated? But presumably though you do have a point where new is called? Or something equivalent like populating it from something else?
    Richard

  • Urgent:how to add two table regions to one query region

    hello
    In my page a serach region is there and for that region i need to add two tables and two are based on two different view objects.how can i implemnet this thing please let me know.
    advance thanks

    Hi Wei Fang,
    You can try by creating a 2 line template (1 Template, 2 linetype) under a loop note.
    So your smartform tree structure will be shown like this:
    LOOP
        TEMPLATE1.
    On the LOOP part, pass the internal table of your data to the working areas.
    On the template put all the data of the summary on your first linetype, and put
    the detail data on your second linetype.
    Good luck and hopefully this will solve the problem
    Edited by: Prawira Fadjar on Oct 22, 2008 10:04 AM

Maybe you are looking for

  • How to use WDR_SELECT_OPTIONS in a view without using window embeding

    Hey guys, I want to use Select Options (via Comp. WDR_SELECT_OPTIONS ) in a Web Dynpro View - V_SUB. This subview is already embedded in a main view V_MAIN dynamically at runtime. Now it is not possible for me to implement the select option usage in

  • ERROR Installing SAP NetWeaver PI 7.1 EHP 1 on Windows Server 2008 R2 x64

    Hi! I'm trying to install SAP NWPI 7.1 on a Windows Server 2008 R2 Standard, but in the step "Create Java User" stop the process when this creating the SAPJSF user, here's my system specifications: OS: Windows Server 2008 R2 x64 Standard RAM: 2 GB Fr

  • PDF attachments on emails

    Newbie here - looking for an answer: I receive an email on my phone (8530Curve) and I can see there is an attachment but when I go to the same email on my PB, no attachment shows - there's nothing there. Back to my phone or pc and it's there - I even

  • Error in sales order transfer using BDOC

    Hi Experts, I have some sales orders which are created at CRM system and posted to R/3 system using BDOC's. I have problem that the orders which are created on CRM system are coming to R/3 using BDOC but they we are not able to change them in R/3. In

  • Wmv files not loading on Safari,10.3.9

    I get emails with attached wmv files & only get their text. Is there, somewhere, an option (helper) I need to enable?