How to add menus in java?

Hello,
I am new to java technology.
I just wanna know from smart java coder , how to add menus to main or mdi form?
I will be very thankful for early response

Hi,
have a look :
http://java.sun.com/docs/books/tutorial/uiswing/components/menu.html
regards
Nico

Similar Messages

  • How to add node in Java system NW 7.3 ehp1

    Hi Everyone,
    Hoe to add node in JAva System in Nw 7.3 ehp1.
    Whats are point which need to keep in mind before adding node?
    Regards
    Adil

    Hi Adil,
    Follow the below steps
    1.Start the Config Tool by double-clicking the configtool script file in <SAP_install_dir>/<system_name>/<instance_name>/j2ee/configtool directory.
    2.choose the Java instance according to the level you want to make configurations.
    3.Choose the Servers tab.
    4.In the Custom Number of Server Processes field, enter the number of server processes you want to have. Click on set and save the configuration
    Choose Check Value to verify that your server is capable of handling the number of server processes you entered. Correct the value if necessary.
    Restart the java engine.
    You need adjust the heap memory accordingly
    SAP Note 723909 - Java VM settings for J2EE 6.40/7.0
    Checked the sapnote if java don't come up
    1658950 - J2EE System fails with "exitcode = -2"
    http://scn.sap.com/community/performance-scalability/blog/2013/08/29/java-memory-sizing-procedure-pragmatic-approach
    With Regards
    Ashutosh Chaturvedi

  • How to add arguments in java command

    hi All,
    I am using ant for calling java command. How do I add more than 1 argument for <arg> tag ?.
    <target name="A" depends="prepare" description="Starts the client" >
    <java classname="Starter" fork="yes">
    <args>
         <arg value="${clientArg1}"/>
         <arg value="${clientArg2}"/>
         </args>
    </java>
    </target>
    Here i get an exception that "The <java> task doesn't support the nested "args" element.".
    How do I pass more than one argument for java command ?.
    Hoping for reply.
    Thanks and regards,
    Sachin P

    Are you serious?
    <project name="foo" default="doThatVoodoo">
        <property name="arg1" value="foo" />
        <property name="arg2" value="bar" />
        <target name="doThatVoodoo">
            <echo message="${arg1}"/>
            <echo message="${arg2}"/>
        </target>
    </project>
    C:\>ant -Darg1=mud -Darg2=bug
    Buildfile: build.xml
    doThatVoodoo:
         [echo] mud
         [echo] bug
    BUILD SUCCESSFUL
    Total time: 0 seconds

  • How to add WebDynpro (for Java) to iView in CE 7.1

    Hi experts,
    Currently trying CE 7.1 SP3. I have created the Web Dynpro project and wanted to add it in iView and subsequently to the Page. However, there isn't a Web Dynpro for Java  iView template selection.
    How do i add the web dynpro for Java to iView and subsequently?
    Thanks.

    Hi Aiwei,
    Please follow the steps to embedd an WebDynpro application in a page.
    Go to the Content Administration--> Portal Content
    Expand the Web Dynpro Applications . Browse the application created.
    Right Click on the Application and Copy.
    Expand the Portal Content folder and browse to the folder where  you want to create Page.
    Right click and click on Paste as PCD object.
    Regards,
    Niraj
    ps: Awards points if helpful.

  • How to add components in java studio creator (htmLib)

    Hi,
    I'd like to add htmLib.jar into the palette of Java Studio Creator or at least into my project. Does anyone know of a tutorial or know how to do this? In particular, I need help in adding htmLib into my project: http://jsftutorials.net/htmLib/
    Thanks,
    Marc

    To add jar files :
    From the main menu, Tools > Library Manager.
    In the Library Manager dialog box, click New Library.
    In the New Library dialog box, enter the library name.
    Choose the library type and click OK.
    Click Add JAR File/Folder to browse for and add JAR files to the library reference.
    Click OK.
    In the Projects window, right-click the Libraries node and choose Add Library.
    In the Add Library dialog box, select the library reference.
    Click Add Library.

  • How to add path to "java.library.path" property?

    I use this command to set the "java.library.path" property:
    java -Djava.library.path=./libs    HelloWorldBut it will overwrite the default value. How can I add the path "./libs" to the default value of "java.library.path"?

    Have you tried
    -Djava.library.path=%PATH%;./libs The command search path is the only default I know. By the way, are you certain that the present working directory will always be the parent of "libs"?

  • How to add Args in java.exe from JNI

    Hi, there:
    Anyone knows how to put the arguments at the java.exe command line,
    involked from C++ code through JNI?

    This is additional information to my original forum topic.
    Here, I would like to have the involked java code to get
    the data file and its location as an argument of java.exe.
    So, not only does the java app start, but it starts with
    initial input data.
    Java involcation is done from VC++ using JNI 2 and jDK1.3.1.
    Thanks.

  • How to add elements into java string array?

    I open a file and want to put the contents in a string array. I tried as below.
    String[] names;
    s = new Scanner(new BufferedReader(new FileReader("outfile.txt")));
    while (s.hasNext()) {
                    String item = s.next();
                    item.trim();
                    email = item;
                    names = email;
                }But I know that this is a wrong way of adding elements into my string array names []. How do I do it? Thanks.

    Actually you cannot increase the size of a String array. But you can create a temp array with the lengt = lengthofarray+1 and use arraycopy method to copy all elements to new array, then you can assign the value of string at the end of the temp array
    I would use this one:
    String [] sArray = null;
    s = new Scanner(new BufferedReader(new FileReader("outfile.txt")));
    while (s.hasNext()) {
        String item = s.next();
        item.trim();
        email = item;
        sArray = addToStringArray(sArray, email);
    * Method for increasing the size of a String Array with the given string.
    * Given string will be added at the end of the String array.
    * @param sArray String array to be increased. If null, an array will be returned with one element: String s
    * @param s String to be added to the end of the array. If null, sArray will be returned.(No change)
    * @return sArray increased with String s
    public String[] addToStringArray (String[] sArray, String s){
         if (sArray == null){
              if (s!= null){
                   String[] temp = {s};
                   return temp;
              }else{
                   return null;
         }else{
              if (s!= null){
                   String[] temp = new String[sArray.length+1];
                   System.arraycopy(sArray,0,temp,0,sArray.length);
                   temp[temp.length-1] = s;
                   return temp;
              }else{
                   return sArray;
    }Edited by: mimdalli on May 4, 2009 8:22 AM
    Edited by: mimdalli on May 4, 2009 8:26 AM
    Edited by: mimdalli on May 4, 2009 8:27 AM

  • JBuilder question on how to add a new .java file

    I am new to Java and even newer to JBuilder. I am creating the GUI for our school project and my other members are creating the networking and database parts of our program seperatly. I am at the point were I need to import their .java files into my project I created in JBuilder.
    Can someone tell me the steps I need to take to get those files into my project so I can start using the classes from my group they made up?
    Thanks,
    Scott

    You can use show_alert statement and then make a check on button that is pressed from the alert.
    Here is an example of show_alert built_in.
    DECLARE
      my_alert number;
      ALERT_TXT     VARCHAR2(200) := 'Do you want to delete record?';
    BEGIN
         set_alert_property('your_alert',ALERT_MESSAGE_TEXT,ALERT_TXT);
           my_alert := show_alert('your_alert');
           If my_alert = Alert_Button1 Then
             /** I choose to delete record **/
            -- here you can put your statements
           else
           -- I pressed NO button
           -- here you can put your statements
           end if;
    END;Hope it helps you,
    Fabrizio
    If this answer is helpful or correct, please mark it. Thanks.

  • How to add the missing java.lang.object

    hi guies:
    when i build the ui dc, an error occurs. it reminds me that the path is incomplete.the compliation indirectly references the missing type java.lang.object.
    if you once confronted the same problem as me and resolved it ,pls told me.
    thanks a million!

    The JDK is not in path of the DC build.
    Hence you are getting this error.
    Check that correct JDK is pointed in preferences.
    Regards,
    Ashwani Kr Sharma

  • How to add to java classpath?

    I am wondering how to add/implement to java classpath. I think I might be missed out the classpath thing so my program doesn't work. I keep getting error message like: "cannot resolve symbol: method setDocumentHandler(BookCounter)" and warning messages like: "C:\Example\BookCounter.java :11: warning:org.xml.sax.HandlerBase in org.xml.sax has been deprecated." and "C:\Example\BookCounter.java :16: warning:org.xml.sax.HandlerBase in org.xml.sax has been deprecated."
    If this is not because of classpath problem, kindly let me know what should I do?
    My code as follow:-
    ========================
    import java.io.*;
    import org.xml.sax.*;
    import org.xml.sax.HandlerBase;
    import javax.xml.parsers.SAXParserFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.parsers.SAXParser;
    public class BookCounter extends HandlerBase
    private int count = 0;
    public static void main (String args[]) throws Exception
    (new BookCounter()).countBooks();
    public void countBooks() throws Exception
    SAXParserFactory f = SAXParserFactory.newInstance();
    SAXParser f2 = f.newSAXParser();
    // Parser p = new com.jclark.xml.sax.Driver();
    f2.setDocumentHandler(this);
    f2.parse("file:///C:/books.xml");
    public void startElement(String name) throws SAXException
    if (name.equals("book"))
    count++;
    public void endDocument() throws SAXException
    System.out.printIn("There are" + count + "books");

    The errors don't look like classpath problems. The first one is a result of it not being able to find a method in BookCounter (or more likely HandlerBase) that has the signature that you are attempting to use.
    The warnings come from the fact that HandlerBase has been deprecated, just like the messages state. In other words, it has been replaced by a newer version, or incorporated into another class' functionality. Check the API for more information.

  • How to add table in SAP Non interactive forms in webdynpro java

    Hi Experts,
    I have a requirement in webdynpro java.I have a print button.On clicking print button a pdf will be opened.
    This pdf will have data from the webdynpro view.I want to know how to add table in the adobe pdf.The webdynpro view will have many rows of table(rows will keep changing as per the size of the data output).How to send this data to adobe.How do we bind the node to the table in the adobe.How to automatically
    Please suggest.
    Thanks,
    Rajani
    Edited by: Rajani Nandagiri on Dec 26, 2008 8:58 AM

    Rajani,
    Take a look at below links, it will help you.
    [Handling Dynamic Length Tables in Adobe Forms|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0859ad1-53aa-2a10-78ae-99e41c407669]
    [Integrate tables & Images in Adobe Web Dynpro|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/dynamic%20non-interactive%20pdf%20form.pdf]
    [How to Handle Table Input and Output|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/7.0/adobe/how%20to%20handle%20table%20input%20and%20output.pdf]
    [How Tou2026deal with Table input and display in Interactive Forms|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00c4041d-188d-2910-6ea2-b4d5155f56e0]
    Chintan

  • How to add a Java file from ejbModule to EJBCandidates ?

    Hi,
    In my java client proxy project, I have got the EJBCandidates generated. But I need to add one more java source file from ejbModule to EJBCandidates.
    If I right click on the java file I need to add, am not getting that option for adding.
    <b>Please help me how to add java source file from ejbModule to the EJBCandidates.</b>
    Thank you.

    Great... :-)
    Thank you very very much xHacker :-)
    That what just what I needed.

  • How to add an image to an IMAGE control in Java WebDynpro

    hi
    How to add an image to an IMAGE control in Java WebDynpro.
    Please give me the steps to assign an image to an IMAGE control.
    Advanced Thanks
    brahma

    Thank You Mathan MP,
    i tried these steps, but whenever i selected the source property of image UI control, it opens a context window, but this context window does't contain any thing for selection.
    so how to solve this problem ?
    the link whatever u provided is not opened, please send the correct link.
    http://127.0.0.1:1284/help/index.jsp?topic=/com.sap.devmanual.doc.user/f3/1a61a9dc7f2e4199458e964e76b4ba/content.htm
    Thanks in Advance
    brahma

  • How to add a navigation Panel and Zoom Slider Bar using Java API

    Hello,
    I am using Mapviewer Java bean as I have to use Oracle Mapviewer in Java Stanalone application.Please can anyone tell me how to add a Navigation panel and Zoom Slider in Java API. I found the API s for same in Java Script but not in Java.Kindly help.
    I am using Oracle Mapviewer 11g.

    This is forum sponsored by Adobe make of Acrobat and Reader. Since Chrome and FireFox web browser have chosen to use their own viewer you might get more help in their forums or customer support.

Maybe you are looking for

  • Can i use my imac g5 as a monitor only?

    i want to get into the intel world at home and i have an imac g5. i was thinking of buying a mini and hoping that i could use the monitor of the imac as the monitor for the mini (without using the computer part of the imac). i'm not sure if/how this

  • Record selected in the table control

    Hi All,   How do i know the line no of the record selected in the table control.I have declared a table control CONTROLS : t_control1 type tableview using screen 200.But in t_control1-current_line the line no that is stored is always 1. Thanks, Rakes

  • Export music from windows phone to iPad and iPhone!

    How do you export music to a iPad mini from a htc radar windows 7.5?

  • Is it possible to create APEX user in background?

    Hi experts, I have a page to create new user with the following items in an application: P1_USER_ID P1_EMAIL P1_PASSWORD It is using Automatic Row Processing (DML) to insert these to PEOPLE table. When submit it above in the same time, I would like t

  • Can't create XMLType based on OPAQUE in Java+JDBC

    Hi, I'm querying the database using Java and JDBC. The resulting column (there is only one) is of type SYS.XMLTYPE. When I want to create an object of class XMLType of the data in this column I'm getting an error in the orageneric.dll. The (partial)