JLabel/JTextArea? which do i use and how

When pressing a random button i need it to display a value, 1 line of text within a label or text area, when i press another button that represents another value i need it to display this value in the same label/text area but on a new line underneath this? I have read the API and can't see anything that shows how to do this?

I am having problems with the text area. when i press
a button it displays the text on the top line next to
each other and carries on out of the text area, not
strating a new line
When i press a button 1 i want it to display "name"
on the top line of the text area and when i press
button 2 i want it to display "surname" underneath
name. also for the text to be aligned to the left
each time it starts on a new line. i am not sure how
to go about coding thisIn that case, I'd just use two JLabels, one for each String. You can lay them out so they're aligned vertically, and left-aligned. If you're not sure how to lay them out that way, google "java layout tutorial"

Similar Messages

  • Which file type should I use and how I use it?

    Hello!
    I need to create a file with some data that has been inserted manually.
    In this file, for example, there are:
    ProjectName1: string1, string7… string10, date1
    ProjectName2: string11, string15… string20, date2
    ProjectNamek: string 100, string 116 … string 140, date1
    I know only one thing: one of the strings.
    What I need to find in the file:
    I need to find the string at one of these rows and get its ProjectName and date.
    For example: if I have string15,
    I should find string15 in the file, and get its ProjectName and date:
    ProjectName2, date2
    Which file type should I use and how I use it? What is the best solution?
    Thanks!

    800512 wrote:
    I need to create a file with some data that has been inserted manually.
    In this file, for example, there are:
    ProjectName1: string1, string7… string10, date1In addition to Pandiya's advice, if the string is always in exactly the above format
    (ie:
    1. ProjectName always starts the line and ends with a ':'.
    2. The rest of the strings on the line are separated by ", " and will never contain ", "
    you might also want to have a look at String.split().
    Winston

  • Which planning function i have to use and how to write this planning fucnti

    Hi Bi Guru's,
    I have rolled out  BW SEM-BPS Planning Layout's for the Annual Budget in my organistaion.
    There are two levels of layout given for the each sales person.
    1)  Sales quantity to be entered Material and  country wise for all 12 months ( April 2009 to March 2010)
    2)  Rate per unit and to entered in second sheet, Material and country wise for the total qty entered in the first layout.
    Now i need to calculate the sales vlaue for each period and for the each material.
    Which planning function i have to use and how to write this planning fucntion.
    Please suggest me some solution ASAP.
    Thanks in Advance,
    Nilesh

    Hi Deepti,
    Sorry to trouble you...
    I require your help for the following scenario for caluclating Sales Value.
    I have Plan data in the following format.
    Country   Material    Customer    Currency    Fiscyear    Fiscper           Qty         Rate        Sales Value
    AZ          M0001      CU001          #             2009          001.2009        100.00                        
    AZ          M0001      CU002          #             2009          001.2009        200.00                        
    BZ          M0001      CU003          #             2009          001.2009        300.00
    BZ          M0001      CU003          #             2009          002.2009        400.00
    BZ          M0002      CU003          #             2009          002.2009        300.00
    AZ          M0001       #               USD          2009             #                                 10.00
    BZ          M0001       #               USD          2009             #                                 15.50
    BZ          M0002       #               USD          2009             #                                 20.00
    In the Above data the Rate lines are entered in the Second Layout, Where the user enters on the Country Material Level with 2009 value for FISCYEAR.
    I am facing problem with this type of data. 
    I want to store the sales value for each Material Qty.
    Please suggest some solution.
    Re
    Nilesh

  • I want to convert a pdf file into xml.Which programme should I use and how do I access it?

    I want to convert a pdf file into xml.Which programme should I use and how do I access it?I am based in India.

    Hello,
    if you create your doc files by the help of WORD, you could use a Microsoft add on (it depends of your WORD Version).
    Hans-Günter

  • HT5527 I don't have iCloud in my system preferences, I am using 10.6.8 how do I see how much storage I am using and how do I purchase more?

    I don't have iCloud in my system preferences, I am using 10.6.8 how do I see how much storage I am using and how do I purchase more?

    You can't check your usage on the iCloud website - you have to do this from the iCloud prefs pane, which you don't have. If you are only using it for email you would have to be storing an awful lot of messages to exceed 5GB. If you are concerned about this you can download some of them to your Mac and off iCloud.
    To do this simply create a folder under 'On My Mac', go to the iCloud mailbox, select some of the messages and drag them to the folder you created. Don't try to do too many at once (say more than 100) and allow time for them to download.
    If you haven't yet set Mail up to access iCloud, but are simply using the website, you can set it up as detailed here:
    Entering iCloud email settings manually in Snow Leopard or Leopard
    If you do decide to upgrade, the latest version of iPhoto is only £10.49, though MS Office is more of a problem. But you can go on as you are as long as your Mac holds out - Snow Leopard is a good solid system.

  • Itunes and all my movies have disappeared,i can no longer add to library from my external hdd which ive always used and can only add from the laptops own hard drive,any ideas what the issue could be?

    ive recently updated, itunes and all my movies have disappeared,i can no longer add to library from my external hdd which ive always used and can only add from the laptops own hard drive,any ideas what the issue could be?if i transfer the movies from the external to the laptop they will add to the library without any problem so theres no issue with the laptop but when i go to add file in itunes i can path to the external but as soon as i select the file nothing happens, just goes back to itunes

    This happens if the file is no longer where iTunes expects to find it. Possible causes are that you or some third party tool has moved, renamed or deleted the file, or that the drive it lives on has had a change of drive letter. It is also possible that iTunes has changed from expecting the files to be in the pre-iTunes 9 layout to post-iTunes 9 layout,or vice-versa, and so is looking in slightly the wrong place.
    Select a track with an exclamation mark, use Ctrl-I to get info, then cancel when asked to try to locate the track. Look on the summary tab for the location that iTunes thinks the file should be. Now take a look around your hard drive(s). Hopefully you can locate the track in question. If a section of your library has simply been moved, or a drive letter has changed, it should be possible to reverse the actions.
    Alternatively, as long as you can find a location holding the missing files, then you should be able to use my FindTracks script to reconnect them to iTunes .
    tt2

  • I have been trying to download and install a trial. What is the best browser to use and how do i do it?

    I have been trying to download and install a trial. What is the best browser to use and how do i do it? The set up and everything is on the desktop but it never seems to load anything?

    what file (name and extension) is on your desktop and what os?
    what have you done to install the desktop file and what do you see when you do that?

  • When I request an email be sent to a contact with more than 1 mail address Siri asks which address to use. How do I select one of them?

    When I request an email be sent to a contact with more than 1 mail address, Siri asks which address to use. How do I select one of them?

    I should clarify:
    When I request an email be sent to a contact with more than 1 mail address, Siri asks which address to use. How do I select one of them by voice in response to Siri's question?
    Bueller? Bueller? Anybody?

  • After downloading OSX Maverick you then cant use work. excel or powerpoint. What do i use and how can i recall my word documents etc

    After downloading OSX Maverick you then cant use work. excel or powerpoint. What do i use and how can i recall my word documents etc

    Use Office for Mac 2011.  If you have it, open one of the programs (Word, Excel, PowerPoint) and do Help > Check for Updates from the menu.
    Otherwise, purchase Office 365 and use that.

  • I can't use Safari as my browser for an on-line training seminar. What other browser can I use and how do I get it?

    I can't use Safari as my browser for an on-line training program. What other browser can I use and how do I get it?

    Web Browsers for Mac OS X
    Pure Mac: Web Browsers
    Web Browsers for the Mac
    Download the browsers from their website.

  • I have two macbooks, one is my old one which my wife uses and my macbook pro.  When either of us make changes in Safari it changes it on the other's computer...please help.

    I have two macbooks, one is my old one which my wife uses and my macbook pro.  When either of us make changes in Safari it changes it on the other's computer...please help.

    You're both synchronizing Safari with iCloud while signed in with the same Apple ID. On one computer, sign out of iCloud in its preference pane and sign in with a different ID.

  • SAP CM25 which profile to use and why and some general questions

    Hi there,
    I have a few general questions, if you may share your thoughts on this.
    In a manufacturing environment, is CM25 more used to finite schedule the work centers or labor or both ?
    Is it a good idea to even finite schedule the planned orders or just production orders ? We want to create production orders 1 week ahead of the production schedule and planned orders gets created 3-4 weeks earlier than production order gets created.
    The graphical tool seems to be slow sometimes when dispatching and doing some actions on the screen, has any one have any say on this. Should we need to have better computers on the floor for this to work ?
    I have been trying my solutions using CM25 and not CM21 or CM27 using the profile SAPSFCG005, is there any other profile that I need to consider and other transactions to consider like CM21 or CM27 for certain purposes?
    Thank you

    Hello
    In a manufacturing environment, is CM25 more used to finite schedule the work centers or labor or both ?
    It can be used for both depend upon bottle neck resource whether machine or labour.
    Is it a good idea to even finite schedule the planned orders or just production orders ? We want to create production orders 1 week ahead of the production schedule and planned orders gets created 3-4 weeks earlier than production order gets created.
    Better it should be finite planning for planned order also you can use MRP with lead time scheduling.
    The graphical tool seems to be slow sometimes when dispatching and doing some actions on the screen, has any one have any say on this. Should we need to have better computers on the floor for this to work ?
    It depends upon the data load and selection,
    Restrict the number of objects to be displayed, for example, select only a small number of work-centers/orders.
    Customize the time profile (transaction OPD2) such that the database read period, the planning period and the evaluation period are as small as possible. As a result, fewer objects are read and displayed.
    Refer KBA  2038780 - Tips for performance improvement on Capacity Leveling
    If you want to process more orders, check whether a batch planning (planning in the background on transaction CM40) is possible.
    I have been trying my solutions using CM25 and not CM21 or CM27 using the profile SAPSFCG005, is there any other profile that I need to consider and other transactions to consider like CM21 or CM27 for certain purposes?
    It depends upon your requirements which transaction to use and which profile. You can customize your own profile also.
    Best Regards,
    R.Brahmankar

  • My computer says I cannot use icloud because I have multiple versions of outlook installed. How do I find out which versions are installed and how do I decide which one to delete?

    My computer states that I have multiple versions of outlook installed and that i cannot use icloud. How d if find out which versions are installed and which ne to delete without interrupting the other?

    That's a Windows/Office problem. You should ask in the Microsoft support forums.

  • LMS 4.2 Why is TCP port 514 used and how to close it?

    An internal security scan showed that TCP port 514 is open on the Cisco Prime LMS 4.2.4 server.  The security team is concerned that this port is commonly used for rsh, which is not encrypted and may use plain text logins or poorly authenticated logins.  The port being open is documented in the "Installing and Migrating ..." manual for LMS 4.2 where it says that this TCP port 514 is used for Remote Copy Protocol in the direction from the server to device.  The well-known port associated with a service is usually on the target host, not on the host that initiates the connection, so this is a little confusing.  I see that there is no rsh service in /etc/inetd.conf, but there is an rsh service in /etc/xinetd.conf.  This LMS is not configured to use RCP for anything, as far as I can tell.
    Can I close TCP port 514 on this server without disasterous results, and how do I do that?
    Or, how do I satisfy the security team that having this port open is not a security concern?
    Thanks for any help.
    Dave

    I have a love/hate relationship with security audits like that. Happy to know the profile of a server but then hating to have to justify everything their "report" "concludes" (95% of which is usually just dressed up too output from Nessus or whatever).
    Problem is with appliance servers running a packaged application like LMS, mucking with the OS settings (rc files etc.) can break things in unexpected ways. I'm more in favor of putting it on a segmented network and applying access-control lists or firewall rules inbound vs. trying to take apart the system and put it back together using only the parts you think are necessary (a bit of hyperbole there but it's to make a point).
    Call it defense in depth and declare victory and then move on with using the tool to actually manage the network instead of defending its configuration to the Stasi.

  • MSS UWL customization : Which .XML to modify and How?

    Hello,
    We have EP7 with MSS/ESS ERP 6.0 EHP4 and already configured the UWL system object with alias 'SAP_ECC_HumanResources'.
    I am using the UWL iview from the MSS business package on portal.
    I have a requirement to modify the task tab table removing few columns like 'Priority' and 'Status' etc.
    Tried the option in UWL Admin as  'Click to Configure Item Types and Customize Views Using a Wizard' but that does not give me any dropdown option to modify any view.
    I am going for the option to modify the xml file to implement the above change.
    There are multiple .XML file's as below and I am not sure which one I should modify to change my view.
    1. com.sap.pct.erp.mss.001 [Med]
    2. com.sap.pct.erp.mss.tra  [Med]
    3. uwl.webflow.SAP_ECC_HumanResources [Low]
    The UWL iview from business package has following properties as,
    sap_uwl_viewname = com.sap.pct.erp.mss.AlertView
    useNavigationId = com.sap.pct.erp.mss.Main
    Can someone please advise which .XML file I need to modify and how?
    After customizing the .XML fime do I need to make any change in the iview property as well?
    Awaiting reply!
    Thanks,
    Smita Thorat

    It would be nice if you can get some basics by reading the online help.
    View - http://help.sap.com/saphelp_nw70/helpdata/en/a2/42e9ba01a5463ba10c797fb8e106d3/frameset.htm
    Navigation Node - http://help.sap.com/saphelp_nw70/helpdata/en/e8/5a43bf9b8f406ea0776a3b428688a4/frameset.htm
    Now, let me try to answer your questions:
    Can you please help me understand why the system ID is 'ADHocSystem' and not my new system 'SAP_ECC_HumanResource' with connector 'WebFlowConnector which i have already registered ?
    Is something missing in config?
    The section "Current Item Information" provides information specific to the UWL item that is currently selected.
    I am not sure which item you have selected in your UWL inbox but it appears to be using an XML configuration file that is related to Collaboration. That is the reason you are seeing the AdHocSystem in the properties.
    What is the worflow task associated with this item ?
    Make sure that your task is mentioned in your XML configuration files and also your XML configuration files have a higher priority.
    I can see its pointing to the com.sap.pct.erp.mss.001 configuration.
    Yes - the section "Current Navigation Information" is pointing to the com.sap.pct.erp.mss.001 configuration.
    So as I understand from your response, I need to change the com.sap.pct.erp.mss.001 .XML file and rename it and then upload it to the configurations. and change the iview property UINavigation ID to <'>.
    Is it correct, please advise?
    This is not as simple as that.
    Based on the changes you are trying to make, you will need to make XML changes and upload (with High priority) for various tasks, views, etc.
    Please do some reading and get started with this and you can achieve this in a few steps. 
    - Shanti

Maybe you are looking for