Layout for JTextArea

I want to develop an application that is having a message window, through which I can be able to send message. The window should have a "Send" button, one "To" textfield, one "Subject" textfield and one textarea with scrolls as needed.
I am not getting the exact layout for placing the components.
If anybody can help me writing the code , I shall be grateful .
Regards.

import java.awt.*;
import javax.swing.*;
public class TEST extends JFrame
     public TEST()
          Container cp = getContentPane();
          cp.setLayout(new BorderLayout());
          JPanel p1 = new JPanel();
          p1.setLayout(new GridLayout(2,1,4,4));
          JPanel p2 = new JPanel();
          p2.add(new JLabel("To"));
          p2.add(new JTextField(20));
          JPanel p3 = new JPanel();
          p3.add(new JLabel("Subject"));
          p3.add(new JTextField(20));
          p1.add(p2);
          p1.add(p3);
          cp.add(p1, BorderLayout.NORTH);
          int v = ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED;
          int h = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED;
          JTextArea ta = new JTextArea();
          JScrollPane jsp = new JScrollPane(ta,v,h);
          cp.add(jsp);
          p1 = new JPanel();
          p1.add(new JButton("Send"));
          cp.add(p1, BorderLayout.SOUTH);
     public static void main(String ar[])
          TEST t = new TEST();
          t.setSize(400,300);
          t.setVisible(true);
}

Similar Messages

  • How to use XDOXSLT in rtf template layout for etext template creation

    <DEFINE CONCATENATION>     BookDetails
    <BASE LEVEL>     Category
    <ELEMENT> Name || '/' || Price     
    <DELIMITER>      '/'
    <END DEFINE CONCATENATION>     BookDetails
    With EFTProcessor the above details are created in xsl file as follows
    <xsl:template name="CONCAT_BookDetails">
    *I need to declare one more variable here
    EG: <xsl:value-of select="xdoxslt:set_variable($mycount, count(.//Category))"/>
    --and use this variable for any dyanamic process inside this template. How to achieve this in rtf template by declaring a xdoxslt function. How to declare this
    syntax in rtf layout so that it creates a varibale in xsl template using the EFTProcessor. Please help me out. The main point here is to include xslt functions in
    rtf template layout for etext template creation.*
    <xsl:for-each select=".//Category">
    <xsl:call-template name="CONCAT_BookDetails_V"/>
    </xsl:for-each>
    </xsl:template>

    in the next time use BI Publisher forum - BI Publisher
    <?format-number(ENTERED_CR,'##,##0.00')?>it's works for me
    output:
    444    ->  444.00
    444.55 ->  444.55

  • How to create the layout for query in Bex 3.5

    Hi All,
    i have one requirement to do layout for query. Report like after passing the variable values and then they will select the required layout. It has to get output according layout selection fields.
    i have no idea about how to create layout.
            thanks in advance...
    Thanks & Regards,
    Mallikarjuna.k

    Hi Gregor,
    In the note 1149346 that you have mentioned, it says -
    You must start the input-ready query in change mode.
    BEx Analyzer: In the properties of the analysis grid, the switch
    "Suppress new rows" must not be set.  Furthermore,
    the switch "Allow entry of plant values"
    must be set in the local query properties.
    I have not seen this setting Allow entry of plant values in a query - can you tell what is refers to?

  • View Crystal Report Layout for my UDO Form

    Hi all,
    I try to view a report created for my UDO form. I set all settings in Administration -> Setup -> General -> Report and Layout Manager. Now I wonder what should be assigned to  eventInfo.LayoutKey. I tried assigned report's DocCode from RDOC, DocEntry of my UDO object or UDO Code but nothing works. Always get an error: Incorrect format of argument or something like that - I didn't get an error in English so I tried to translate it.
    How to show a report layout for my UDO form?
    Regards
    Szymon Lipnicki

    Hi and thanks for Your reply.
    Help file contains example how to open report layout prepare in Crystla Reports designer for UDO form.
    //Add Layout Key Event Handler
    SBO_Application.LayoutKeyEvent += new SAPbouiCOM._IApplicationEvents_LayoutKeyEventEventHandler(SBO_Application_LayoutKeyEvent);
    void SBO_Application_LayoutKeyEvent(ref SAPbouiCOM.LayoutKeyInfo eventInfo, out bool BubbleEvent)
        BubbleEvent = true;
        if (eventInfo.ReportTemplate == "A001" && eventInfo.ReportCode == "A001001")
            eventInfo.LayoutKey = 1; //Set the key of the layout
    I am using SAP 8.81.
    Regards
    Szymon

  • Layout for report output

    Hi,
    We copied the standard FBL5N Program to zprogram.We are not able to get the report based on the layout. F4 help is not working for the layout selection,The FM REUSE_ALV_VARIANT_F4 is used to select the variant.But we have checked the table V_LTDX, there are no report with zprogram created ,.hence the output of the report is always displaying based on the standard layout.
    Kindly guide me to resolve this issue.

    Hi,
    First you have to save the Layout on ALV output screen. when you execute the Program next time, if you press F4 it will show the availble Layouts for the Program (If you have that F4 logic for that Layout field on Selection Screen).
    you have to pass that variant to " is_variant " parameter in REUSE  Function module.
    you can refer the program RLS10030 program for sample code.
    Regards,
    Bhavana

  • Default Layout for a report running in background

    Dear Friends,
    I have created a layout for report ME2L and set as default layout  (for every user)....
    Foreground execution picked the DEFAULT layout but when am trying to execute the same report in background, default layout is not picked but the STANDARD layout is shown in the spool
    Could you please suggest me how can i use same report layout for foreground as well as background
    Thanks in Advance
    Ana

    Atanu dey,
    If you wnat to download excel in back ground
    You have to download in application server only.
    EX:
    DATA :  v_filepath(80)     VALUE '/data/sapdata/inc/error_log/pme_br/',
      c_coma     VALUE ',' .
    OPEN DATASET v_filepath FOR OUTPUT IN TEXT MODE.
        IF sy-subrc EQ 0.
         LOOP AT i_errors_bat.
         CONCATENATE i_errors_bat-plant c_coma
                                 i_errors_bat-zzvendor c_coma
                           INTO v_string.
            TRANSFER v_string TO v_filepath.
          ENDLOOP.
       CLOSE DATASET v_filepath.
    Note : you can download in presentation server also.
    but it requires lot of authorizations and have to use
    FTP commands.
    Reason is Apllication server in back ground has to
    recognize the from which system request came.
    Better go for OPEN DATA sets.
    Don't forget to reward if useful.....

  • Unable to change keyboard layout for all users on Windows Server 2012 R2

    Hi,
    I have a requirement where I need to support national keyboard layout for Danish for all users on that machine. When I ran the powershell with script Set-WinUserLanguageList
    -LanguageList da-DK it only sets the Danish keyboard layout to the specific logged in user.However the for other users its same English(US) keyboard which is not expected.
    Please help me how to set the Danish keyboard for all users on the machine. Its Urgent!Thanks

    Hi Mike,
    Thanks for reply.
    But I need to configure everything using powershell script. Is it possible to use powershell script to setting group policy/ adding logon script ?
    These are pretty basic administration tasks and almost always quicker to accomplish with the GUI. Why do you want to use a PowerShell script?
    EDIT: Here's some information on the topic however:
    https://technet.microsoft.com/en-us/library/cc781361%28v=ws.10%29.aspx
    http://blogs.technet.com/b/heyscriptingguy/archive/2011/01/06/use-powershell-and-group-policy-for-your-logon-script.aspx
    Don't retire TechNet! -
    (Don't give up yet - 13,225+ strong and growing)

  • How can i set a layout for MIGO screen

    Hello all,
    How can i set a layout for MIGO screen. & make that layout default. Like i want to drag Requistioner column next to quantity in MIgo screen. temporarily I can drag but is there a way to save as layout & save it.

    Hi
    First you arrange however you want and then go to table settings which is there in the right corner of the item details and create a variant and save.
    Find a button with blue yellow and white at the top end above the vertical drag bar when put the cursor it will show you as Configuration.
    After creating the variant tick the check box use as standard setting below the variant
    Hope it helps
    Edited by: Girish  Adaviswamy on Mar 3, 2010 1:27 PM

  • How to Extract Data from IT 0025 and Modify the layout for Printing

    Hi All,
    Query----> My client has a requirement to output the appraisal data in a given format from IT 0025. (The entire appraisal done for the employee)
    I would like to know from where this data will be picked up … is this data stored in some cluster table and how can we change the layout for printing in the desired format?
    Note: PA and PD is Integrated. When we create appraisal in IT 0025 no record gets created in PA0025, in which table does the record gets created and how to retrieve the data?

    hello,
    normally stored in pa0025.
    are you using the old or new appraisal system?
    if you are using the new one. its not stored in pa0025 it is done with relationships..
    regards
    stefan

  • How can I set default toolbar layout for all users in my system?

    Hi everybody! I am running a local ubuntu server at my office. I can set some defaults preferences (about:config) for all new users in the system by defining those prefs in the /etc/firefox/syspref.js.
    Now, I want to define default toolbar layout in a similar way (maybe not needed but fun), to copy the toolbar layout for my user. Is there a general way to do that?
    thank you in advance!

    You can try to create a default template folder (defaults/profile) in the Firefox and place the file(s) in that folder for newly created profile.
    The only way to customize an existing profile is to copy files directly to it.

  • Error in layout for UDO

    Hello everyone,
    I have a problem with the launch of the report from a user Form.
    I created a layout for my UDO, I created a Form for UDO and I connected the layout to the mask.
    The report parameter is a standard SAP token (DocKey@).
    When I launch the preview is returned the error "Format of the input string is incorrect." if I insert the parameter in Crystal Report mask that appears after, the printing is working properly.
    In the attachment post is said that taking away the value of the ObjectType defined for the form,the report should work; unfortunately this is not a solution because doing it SAP can not handle events, and the mask is no longer possible to navigate between documents.
    [View Crystal Report Layout for my UDO Form]
    I'm doing something wrong or is it a bug? Do you know any case where there is a workaround?
    I work with SAP 8.81 PL04
    Thanks,Enrico.

    hi,
    check the JSP file name "Sample.jsp", "s" caps or small. 
    In portlapp.xml file give same name for <component name="<b>Sample</b>"> and
    <property name="com.sap.portal.reserved.layout.TemplateFile" value="<b>sample</b>.jsp"/>. Component name & jsp file name should be same...
    Regards,
    Senthil K.

  • Creating Planning Layout for GP12N  - Posting Period as columns/rows

    I am trying to create new layouts for GP12N, but do not know how to create the integrated layout with one column or one row for each Posting Period 1 - 12.  I did read that 'Sets' were not allowed.  Can anyone provide the steps necessary to allow Posting Periods as columns or rows?

    Hi,
       a) Remove period from general data selection.
       b) Create 12 columns of the same Key Figure which use the characteristic period and set it as a fixed value

  • Error while saving layout  for report

    Using BIEE 11. (Win64 Server 2003 R2 - russian edition)
    When designing layout for report and putting text field (dos'nt matter - russ or engl) - I get an error during saving - 'Error when saving layout' (trunslated from russ)
    This happens only when putting text field, with other types of filds all is ok!
    Where can I find more detailed info about my error?
    Also when I choose layout from existing e.g. - Dashboard.xpt and save - I get the same error. When I cut off all text fields from this template - I can successfully save it.
    Thanks

    Check the OSS note 550760 regarding the issue.

  • On iPhoto, I can no longer access the 'Classic' option which would lay out my photos on the page. It will send them as attachments only. I need the page layout for my work. Any thoughts as to why this has changed?

    On iPhoto, I can no longer access the 'Classic' option which would lay out my photos on the page. It will send them as attachments only. I need the page layout for my work. Any thoughts as to why this has changed? It used to fully lay out the photos so I could add notes and detailed information before I sent them. I am thinking it is something simple that I have just missed...

    The "Photos" view has been replaced by the Media Browser.
    Most applications will show you the Photos icon in the Sidebar, when you need to select photos in a file chooser dialoge. Mail, Safari, the iWork apps. See Terence Devlin's User Tip: How to Access Files in iPhoto
    For example, in the File > Open dialogue in Preview I am seeing this in the sidebar.

  • Urgent: How to create a new layout for portal lightframeworkpage

    Expert,
    I want to create a new layout for  external facing portal. I have created a new par project also in NWDS, but being new I do not know where to get "com.sap.portal.layouts.default.par" and other supporting libraries.
    Need an urgent help.
    Thanks in advance
    -Lave Kulshreshtha

    Hi,
    Look into this blog to know, how to write custom layouts:
    Nuts and Bolts of the External Facing Portal (EFP)
    Once you wrote your layout jsp, then declare it in portalapp.xml like this:
    <component name="example_narrowWide">
          <component-config>
            <property name="ClassName" value="com.sapportals.portal.pb.layout.PageLayout"/>
            <property name="SafetyLevel" value="no_safety"/>
          </component-config>
          <component-profile>
            <property name="ComponentType" value="com.sapportals.portal.layout"/>
            <property name="com.sap.portal.pcm.Title" value="2 Columns (Narrow:Wide)"/>
            <property name="com.sap.portal.pcm.Description" value="two-column layout displaying the narrow column on the right"/>
            <property name="com.sap.portal.reserved.layout.TagLibLayout" value="/SERVICE/com.sap.portal.pagebuilder/taglib/layout.tld"/>
            <property name="com.sap.portal.reserved.layout.TagLibHtmlb" value="/SERVICE/com.sap.portal.htmlb/taglib/htmlb.tld"/>
            <property name="com.sap.portal.reserved.layout.TemplateFile" value="*yourLayout.jsp*"/>
            <property name="AuthScheme" value="anonymous"/>
            <property name="com.sap.portal.reserved.layout.Cont1" value="Left Column">
              <property name="plainDescription" value="Column 1"/>
              <property name="orientation" value="vertical"/>
              <property name="designClass" value="prtlPageConL"/>
            </property>
            <property name="com.sap.portal.reserved.layout.Cont2" value="Right Column">
              <property name="plainDescription" value="Column 2"/>
              <property name="orientation" value="vertical"/>
              <property name="designClass" value="prtlPageConR"/>
            </property>
          </component-profile>
        </component>
    As all the layout taglibs and required classes are in com.sap.portal.pagebuilder application, you should refer to it in your portalapp.xml SharingReference property.
    Try all this and if you have specific questions, let me know.
    Regards,
    Praveen Gudapati

Maybe you are looking for

  • Hierarchy Node display in report designer

    Hi, Urgent please help me out. I have an issue with report designer. I created a static report in Query designer with 2 structures. When i try to include this query in Report designer, only the last level nodes are getting into the Report designer. A

  • Attachments for documents in Business One 8.81

    Hi everyone, I would like to know if with the release 8.81 pl09 is it possible to manage attachments via DiApi for document objects such as orders, order drafts...I cannot find property ActEntry exposed or the collection Attachments. Thanks very much

  • Cairngorm Persistence library - not on wiki/in Maven?

    Hi, The Cairngorm Persistence library's download link on the wiki is broken, and I believe the library is not in the Maven repository. The Persistence library's download link on the Cairngorm Libraries wiki page is broken. Download link: https://sour

  • MPLS versus Switched network

    Hi all, Can Someone tell me if an MPLS network is faster or slower than a switched network ? Could you please tell me what this line means : rate-limit output access-group rate-limit 0 3000000 600000 1200000 conform-action transmit exceed-action drop

  • Finder - Search Problems?

    Hi There, Before I upgraded to Lion I was able to search for keywords within files within Finder and it would show me which file it was from. For example, if I had codes within an excel file, I could search for the specific code and then Finder would