How to display text?

hello guys, i've created a frame using these codes
JFrame frame = new JFrame();
          frame.setSize(FRAME_WIDTH, FRAME_HEIGHT);
          frame.setTitle("Aeroplane Seat");
          frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          frame.setVisible(true);
now may i know how do i add a text inside the frame?

http://java.sun.com/docs/books/tutorial/uiswing/

Similar Messages

  • How to display text on last but one page in SAPSCRIPTS

    how to display text on last but one page in SAPSCRIPTS

    u have create one Foooter window , this has to be called in  only One Page.So hardcode /assign this window to only one PAGE number.
    regards
    Prabhu

  • How to display texts automatic. besides entered value for a field in Trans.

    How to display texts automatically besides the entered value for a field in a standard transaction screen. For example you have a value table and a text table associated to it. Then on entering the value field and pressing enter the text associated should get displayed immediately besides the value. Like if you have 'LOC' as the value and 'Location' as the text associated to it, on entering this value 'LOC', you automatically get the text 'Location' printed besides it automatically in a transaction screen ?
    Message was edited by: Sarika Kedia

    Hi sarika,
    Welcome to SDN.
    1. first of all, such display of text,
       is not automatic.
       (it appears to be automatic)
    2. At design time,
       a) take one extra field for text
         and mark it as OUTPUT ONLY
    3. Then in PBO coding,
        call some module, and in that module
        write code
    4. The code should be to
       select from TEXT Table
       into the work area.
    EG. THE SCREEN TEXT FIELD NAME IS
    T510A-FIELDNAME.
    CLEAR t510a.
      SELECT SINGLE * FROM t510a INTO t510a
      WHERE trfar = FIELVALUE.
    5. This will take care of
       displaying the text value of that field.
    regards,
    amit m.

  • How to display text on last but one page

    how to display text on last but one page

    Hi Preeti,
      If u r working on a smartform then click on th window go to the condition tab there
      at the end u will find events click on the the event on which u want to trigger the 
      print.
      If u r working on a script then create a text element and call this text elemtn at
    the end of processing of the main window, this will make sure that thetext element
    is triggered only at the end.
    I hope that helps u , if not pls let me know.
    Regards,
    Vaibhav B Gawali.

  • How to display TEXT vertically in SMART FORM

    Hai,
    I need to display the column name of a table vertically (readable from bottom to top) in smart form.
    Could any one please tell me how to do this?
    Thanks & Best Regards,
    Maniyam Bhaskar.

    Hi,
    Go through these threads for the discussions happened on similar issue... hope it helps you..
    how to print text vertically in smart forms
    vertical and horizontal printing in same page with smartforms or sapscript
    Good luck
    Narin

  • How to display TEXT more than 500 char in a report as multiple lines.

    Hi Friends,
    i have a requirement like i should display Texts of length more than 500 Characters in a report( ALV LIST) as multiple lines
    I am fetching the data Using FM READ_TEXT
    the output im currently geeting with 150 Char in lenth as a single line
    How we can split the text into multiple lines in a report
    first i would like to know is it possible? if possible please give your valuable suggitions if not is there any alternative way to do this task.
    Thanks & regards
    kumar.

    Hi,
    This is possible but the Solution might not look Standard/Appropriate to you.
    In ALV, you can have Multiple Line Output...There is a Field in the Field Catalogue..called as Row_position...this is by default 0...which means Single row/Line ALV output....You can have this Value in the Range of 0 to 3.......A ALV field with row_position 1, will be displayed in the second line for every record...i.e. you will have multiple line for a single record of ALV.
    In your case......you can use this but you need to split your field in two fields.....but you may end up spliting a single word....but for that also you can design the logic of splitting the Fiel value at SPACE only......
    This may work.......and Sorry if not work......

  • How to display text file in JSP?

    Hi,
    I am new to servlet/JSP/java programming.
    I have been able to download a file using ftp. I dont know who to display it in JSP.
    Here is my code. Any help will be appreciated...
    <%@ page import="java.util.*" %>
    <%@ page import="java.lang.*" %>
    <%@ page import="java.net.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="com.dmhistory.*" %>
    <html>
    <head>
    <title>Untitled</title>
    </head>
    <body>
    <%
    byte[] bytes = new byte[4096];
    URL theUrl = new URL("ftp://user:passwd@host/migr/Movers_for_Ora8/BG/logs/FLD-PAC3-20020311.log");
    BufferedInputStream in = new BufferedInputStream(theUrl.openStream());
    BufferedOutputStream outstream = new BufferedOutputStream(new FileOutputStream( new File( "D:/temp/log.txt" )));
    int pos = in.read( bytes );
    while ( pos != -1) {
    outstream.write( bytes, 0, pos );
    pos = in.read( bytes );
    %>
    <%
    in.close();
    %>
    DONE!!!
    </body>
    </html>
    How can i display this downloaded file in the browser?
    I want to display it in the original format i.e which new line and carriage returns...line by line..
    Thanks,

    Hi,
    I finally go it to display. but now I have new problem. The browser shows the text without the /n/r.
    But when I view the source using 'view->source', if see that the text has got proper format with newline and carriage returns.
    Any ideas how to display it correctly in the browser?
    <%
                   URL theUrl = new URL("ftp://user:pwd@host/migr/Movers_for_Ora8/BG/logs/FLD-PAC3-20020311.log");
                   //URL theUrl = new URL("ftp://dbcmaint:[email protected]/migr/Movers_for_Ora8/SNP/logs/SNP-PAC2-20020314.log");
                   URLConnection uc = theUrl.openConnection();
                   InputStream content = uc.getInputStream();
                   BufferedInputStream in = new BufferedInputStream (content);
                   LineNumberReader lnr = new LineNumberReader (new InputStreamReader (in));
                   String tempStr = "";
                   String str = "";
                   while ((tempStr = lnr.readLine()) != null) {
                   str += (tempStr);
                        %>
                        <%=tempStr%>
                        <%tempStr = "";
                        %>
                   <%
                   in.close();
                   lnr.close();
              %>
    Thanks

  • How to display text in script as same as text in news paper

    Hi Expets
    I have a requirement i need to display text in script as same as text displayed in news paper
    with out creating any windows. iie ( Abcdef should be in one cloum after some space i need to display 1234)
    please let me know how can i achieve this
    Ex
    1.
    hi abcdef           12345
        abcedf          12345
    abcedf            12345
    Regards
    Suresh
    Edited by: suribabu124 on Jun 15, 2010 7:55 AM

    Hi,
    If you need to print a form like news paper you need go for multiple main windows.We know that we can use 99 main windows in one page.first create one main window and then leave a space then create one more window and select window type as mainwindow.
    while populating data,after completion of one main window the control will move to next main window,which is in the same page.
    Like this you need to analyse and code according to your requirement.

  • How to display text in custom control?

    Im doing a module pool program. There I have a Input field ,if user input there, some text I have to show in custom control. I have created custom control . But how to display some text there? what method I have to use?
    I have use this code for creating custom control.
    CREATE OBJECT EDITOR_CONTAINER
          EXPORTING
            CONTAINER_NAME              = 'TEXTEDITOR'
          EXCEPTIONS
            CNTL_ERROR                  = 1
            CNTL_SYSTEM_ERROR           = 2
            CREATE_ERROR                = 3
            LIFETIME_ERROR              = 4
            LIFETIME_DYNPRO_DYNPRO_LINK = 5.
        CREATE OBJECT TEXT_EDITOR
          EXPORTING
            PARENT           = EDITOR_CONTAINER
            WORDWRAP_MODE    = CL_GUI_TEXTEDIT=>WORDWRAP_AT_FIXED_POSITION
            WORDWRAP_POSITION          = LINE_LENGTH
            WORDWRAP_TO_LINEBREAK_MODE = CL_GUI_TEXTEDIT=>TRUE.

    Hi,
    You will have to use the method 'set_text_as_r3table' to display your text in the object.
    The text will have to be passed as an internal table to the method.
    Regards,
    Ankur Parab

  • How to display text in reverse order ?

    I was wondering how to display data [text-numbers...etc] in the reversed order.
    E.g.
    if the data is as follows:
    ORACLE
    it should be displayed as:
    ELCARO
    thanx in advance !

    An alternative would be a MODEL clause solution:Nice!
    Here another alternative with only one measure:
    SQL> create table t
      2  as
      3  select 'bocajijA' col1 from dual union all
      4  select 'ORACLE' from dual union all
      5  select null from dual
      6  /
    Tabel is aangemaakt.
    SQL> select old_col
      2       , col1
      3    from t
      4   model
      5         partition by (col1 old_col)
      6         dimension by (0 i)
      7         measures (col1)
      8         rules iterate(10000) until (iteration_number = length(col1[0])-1)
      9         ( col1[0]
    10           = substr(col1[0],1,iteration_number) ||
    11             substr(col1[0],length(col1[0]),1) ||
    12             substr(col1[0],iteration_number + 1, length(col1[0])-iteration_number-1)
    13         )
    14  /
    OLD_COL  COL1
    bocajijA Ajijacob
    ORACLE   ELCARO
    3 rijen zijn geselecteerd.Regards,
    Rob.

  • How to display text dynamically

    hello,
                                  i am working in dialog programing i need to display text which is save in a file and i want that whenever each new call screen i should display a text message from my flat file on the new screen ..... is there is a funda of xml?

    If the text is same for all the screens then copy it into a string or variable type c and write it on all the screens

  • How to display text of note tab of invoicing

    Hi all,
    I want to display text that is written in notes tab while doing invoicing that is through FB60 and MIRO.
    I searched for it in tables STXL and STXH but text isnt stored there, pls help me out.
    Thank you,
    Sonali

    Thanks Gokul it helped
    awarded u points.

  • How to display text value in the header data (Header text) of credit memo

    Hi...
    I need to display the text value of the text field in the header text of the header data in credit memo.
    The text values are stored in a ztable and i need to display it based on the billing document stored in vbrk (zfield) that was inserted during the creation of credit request..
    Appreciate your help on how to do this...
    Thansk and will surely reward the points..
    Kanthi..

    Hi kanthi ,
                   Read the value from Z Table and during the creation of cedit memo check out for some exit where u the value from The zTABLE AND use function module SAVE_TEXT with object and id in the header text .
    Please award if useful.

  • How to display text in addition to average group result

    Hi All,
    This is probably really simple but i need your help.
    What i have done:
    I have 4 questions which each one has 5 radio box options. For each group of questions, i have put a value of 1-5 for the radio boxes.
    What i am trying to do:
    What i want to do is calculate the total for the group results as an average and display some additional text. T
    The averaging for the group results is working, but i dont know how to add the additional text for the 1-5 values returned.
    For example, if the average for all 4 questions turns out to be 3, i want the text box to not only display 3 but state Moderate - 3; or something like 3 - Moderate.
    Any help would be greatly appreciated.
    Thank you,
    Greg

    Like in Excel you need to add some additional code but with JavaScript it is a lot more code. Unless you use a hidden field to hold the computed average, you need to provide all the code to perform the average, that is sum all the fields and divide by the number of fields. Once you have that value you can concatenate the text to the number. Or you could have one text field with the computed average and a second text field with the text. You will also have to deal with the average not always being a whole number. If you change the number of decimal places for your solution, you will see this.
    function GetField(cName) {
    // get object for field with cName;
    // return object or null if not found;
    var oField = this.getField(cName);
    if(oField == null) app.alert("Field named " +cName + " not found.", 0, 0);
    return oField;
    } // end GetField function;
    function Sum(aNames) {
    // get sum of the fields in aNamee array;
    var nSum = 0; // sum of fields;
    var nValue; // value or a single field;
    // process array of field names;
    for(i = 0; i < aNames.length; i++) {
    var nValue = GetField(aNames[i]).valueAsString;
    if(isNaN(nValue) == false) nSum += Number(nValue);
    } // get next field name;
    return nSum;
    } // end Sum function;
    function Average(aNames) {
    // compute average of the values of array of field names;
    var nAverage = "";
    var nSum = Sum(aNames); // get sum of field values;
    if(aNames.length > 0) nAverage = nSum / aNames.length;
    return nAverage;
    } // end Average function;
    // array of field names to average;
    var aFields = new Array("Value.0", "Value.1", "Value.2", "Value.3", "Value.4");
    // compute average using the function and place result in a variable;
    var nAverage = Average(aFields);
    // array of text for value of average;
    var aResult = new Array("Zero average", "Poor", "Better", "Mid point", "Better", "Best");
    // display computed average and text;
    event.value = nAverage + "  " + aResult[Math.floor(nAverage)];

  • How to display text in colour and arrange radiobuttons in sequence

    Hi all,
    according to my requirement  the screen should be appear like this Rate Caregory in green colour
    under this Select Action should be displayed in blue colour
    under this three radiobuttons should be displayed like this sequence
    copy  Massupload  Automated Rate Processing if copy radiobutton is selected remaining should be disabled.
    but for me the radiobuttons are displaying one by one i have to display it in the above sequence manner.
    kindly send me the steps how to achieve this functionality.
    Thanks & Regards,
    Naveen

    data nodeinf type ref to if_wd_context_node_info.
    data node type ref to if_wd_context_node.
    node = wd_context->get_child_node( 'ZRADIO' ). "ZRADIO is the node name
    nodeinf = node->get_node_info( ).
    data lt_vs type table of WDR_CONTEXT_ATTR_VALUE.
    data ls_vs type WDR_CONTEXT_ATTR_VALUE.
    ls_vs-text = 'Copy'.
    ls_vs-value = '1'.
    append ls_vs to lt_vs.
    You dont need to write this code. just give '1' in the key to select porperty of the radio button.'
    and create on label also for each radio button. three labels for three radio buttons.
    and as you said if i create an attribute name flag type wdy_boolean and if i bind it readonly property of all radiobuttons.suppose if i select copy radiobutton remaining two will be disabled.
    actually it will disable all the three radio buttons.
    but in anycase your requirement is that user should not be able to select the other radio buttons once he has selected one.
    that requirement will be fulfilled by this.
    thanks
    sarbjeet singh

  • How to display TEXT description from Documents tab of Product master in ISA

    Hi,
    We have product related PDF document attached with Product.
    I can access in CRM by Going
    Products--> Maintain Products.
    When I chose specific Product I can see Product related details.
    There are many tabs like "General", "Material", "Sales and Distributions", "Documents",  etc...
    "Documents" tab have 2 folders "Pictures" and "TEXTS".
    under "TEXT" folder we have PDF documents.
    it has short product name like "ASP009" and Description "ASP 009 Manual".
    When I click on any one I can see attached PDF document in Preview window in CRM.
    How I can access text description "ASP 009 Manual" on "ProductDetailsB2C.JSP" file.
    I want to display this "ASP 009 Manual" description on "ProductDetailsB2C.JSP".
    Is there any Standard Java class method available in ISA.
    I really appreciate any help on this and assign points to them for solution.
    Thanks in Advance.
    Ashish

    Here's the steps we use in our ProductDetailB2C.jsp (B2B uses same code in another file name I forget right now) to provide a link to our technical data sheets...this includes how to create a new document type in CRM as well as the code needed to display it on the ISA
    Step 1: Transaction OAC2, create Document Type example CRM_TECHDA
    Step 2: Transaction SPRO-> CRM -> Basic functions -> Content Management -> Define template for folders
    Step 3: Double click template PRODUCT_MATERIAL
    Step 4: Right-click Documents, Choose Create Folder
    (Make sure to input DOCUMENT TYPE(Properties TAB) = Step 1 value example CRM_TECHDA)
    Step 5: Add a new set of lines of code for each of the types of 'text' you have created to display as a link in the .jsp file(s), changing the CAPPED name to the appropriate name of your specific field below:
    <% if (currentItem.getAttribute("DOC_P_CRM_TECHDA") != null && !currentItem.getAttribute("DOC_P_CRM_TECHDA").equals("")) { %>
                   <tr>
                     <td colspan="2"><a href="<isa:imageAttribute guids="DOC_P_CRM_TECHDA,DOC_P_CRM_TECHDA" name="webCatItem" defaultImg="mimes/shared/no_pic.gif"/>" target="_new"><img src="<%=WebUtil.getMimeURL(pageContext, "b2c/mimes/images/pfeil_rechts_mit_rand_blau.gif") %>" alt="" border="0"> Technical Data Sheet</a></td>
                   </tr>
                   <% } %>
    Edited by: Mike Anecito on Jul 17, 2008 8:27 AM
    I forgot to add, that you could add the attribute information Sateesh talks about where we just use "Technical Data Sheet"
    on the third line of the code...we don't bother with the name of the file as you're needing since we had too many people
    naming them and the overall consistency was horrible.

Maybe you are looking for

  • Active table in DSO

    Hi Friends, What is the property of the Active Table of D.S.O means it alway has the functionality like Overwrite or addition also. OR it is based on the settings of the field in the transformation. Thanks in advance. Thanks & Regards, Vas Edited by:

  • The trial period for this product has expired or Secure Store Shared Service is not supported for this SKU - SharePoint Foundation 2013

    After sucessfulling installing the SharePoint Foundation 2013, when i try to access the Secure Stored Service Application i get the below error 11/16/2012 18:13:02.84  w3wp.exe (0x1774)                        0x15E8 Secure Store Service           Sec

  • Mantain G/L Balance

    hi all, is there any way in sap through which we can mantain the G/L A/c Balance? i.e if an a/c balance goes below the particular balance the system should not allow the user to make any outgoing payment. I am an abap consultant.......so plz tell me

  • What is the use of read_text in scripts?

    hi what is the use of read_text in scripts?

  • R/3-IDOC-XI-WS

    Hi Gurus, I am working on PI 7.1 and have a business scenario where in..when a user creates a Plant maintenance order using IW31 transaction, i need to send the record details to PI where, through the use of ccBPM i need to call relevant Webservices