How can i put text/chars inside a text area inside a JScrollPane?

ive tried:
receipt.setText("blah blah") // but it does not work. all i get is still a blank text area inside a JScrollPane
JTextArea receipt;
JScrollPane sp;
receipt = new JTextArea();
sp = new JScrollPane(receipt,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);

mstrnew = new JButton //this should clear receipt
if(evnt.getSource()==mstrnew)
              order.setText("");
              price.setText("");
              total.setText("0.0");
              cash.setText("");
              change.setText("");
              mstrtotal = 0;
              JOptionPane.showMessageDialog(null,"              Starting New Transaction...","",JOptionPane.PLAIN_MESSAGE);    receipt.setText("");}
else if(evnt.getSource()==vm1)
              generate("           2pc. Chicken Strips Meal\n");
              order.setText("2pc. Chicken Strips");
              price.setText("61.0");
              mstrtotal = Double.parseDouble(price.getText()) + Double.parseDouble(total.getText());
              total.setText(String.valueOf(mstrtotal));
// scrollpane part
             receipt = new JTextArea();
             receipt.setEditable(true);
             //receipt.setLineWrap(true);
         up = "\n          YUM! Brands Corporation, Kentucky Fried Chicken ?\n                       KFC LaSalle Branch, Taft Ave., Manila\n\n           88788   TIN-209-670-390-002   REG VAT   POS#113\n           SN:41-HK170 All prices were subjected of 12% VAT.";
         mid = "\n\n";
         down = "\n";
         complete = up+mid+down;
         receipt.setText(complete);
         sp = new JScrollPane(receipt,JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
public void generate(String z)
         mid += z;
         complete = up+mid+down;
    }Message was edited by:
ice3d

Similar Messages

  • How can i put text across a photo?

    how can i put text across a photo?

    You'll need an external editor for that:
    In order of price here are some suggestions:
    Seashore (free)
    The Gimp (free)
    Graphic Coverter ($45 approx)
    Acorn ($50 approx)
    Pixelmator ($50 approx)
    Photoshop Elements ($75 approx)
    There are many, many other options. Search on MacUpdate. You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.

  • How can I put text in transparent background?

    How can I put text in transparent background?
    Message title was edited by: Brett N

    Good day!
    You can create a new document (»Background Contents« set to »Transparent«), use the Type Tool (T) to create text and then save in a format that supports layers like psd, psb, tif.
    If the receiving application can’t handle those png24 is another option.
    Regards,
    Pfaffenbichler

  • How can I put a pattern inside a word?

    Hi peeps!! I need a lil help.  What I have here is the word "WILD" with outlines created and a jpg of zebra stripes that I live traced and expanded.  How can I get the zebra pattern to show up just inside the letters?  I've tried a clipping mask but perhaps I'm not doing it correctly.  I tried masking with each element on top and that didnt seem to change anything.  I believe there is a way to make a vector element a pattern and put it in your swatches but I can't seem to figure out how to do that either.  This is for a print job on a clear mug so it must be able to produce that. 
    Any suggestions?
    Thanks!!!

    gurl,
    If you just want the zebra pattern to appear in the WILD (inside the bounding strokes, but not in the counter of the D and not between the letters, you may, based on the outlined letter shapes:
    If you want the strokes visible:
    0) Select the letter shapes and Ctrl/Cmd+C+B to make a copy beneath the stroked letter shapes, leave the original(s) and work with the copy.
    1) With the letter shape (copy from 1)) selected, Object Compound Path>Make,
    2) Also select the zebra pattern and Object>Clipping Mask>Make.
    If no stroke is needed, you may use Live Type as the Clipping Path.

  • How can I put text on individual photos

    I would like to put text on some of my photos,,,,How?

    Aperture really isn't designed to put general text on an image.You could cobble something together using the Book interface but I don't think it would really be a suitable solution.
    You'll need to look into using a plugin, BorderFX is a free plugin that many users her (including myself) have used. It does what you are looking for and works well.
    regards

  • How can I put text under background?

    Hi all,
    I'm trying to put text over background, specifically
    a) using 'textures' - 'liquid - 'pool' so that the text looks like it is being viewed under water with the ripple effect distorting the text.
    b) using 'texture' - 'medley' - 'stage' i.e. to make the text look as if it is printed on the background rather than hovering above it.
    Any ideas? Thanks in advance.
    Dave.

    Good day!
    You can create a new document (»Background Contents« set to »Transparent«), use the Type Tool (T) to create text and then save in a format that supports layers like psd, psb, tif.
    If the receiving application can’t handle those png24 is another option.
    Regards,
    Pfaffenbichler

  • How can I put a subpanel inside another subpanel?

    Hi,
    Is it possible to put one subpanel o several subpanels inside one main subpanel?
    Thanks,
    ToNi.

    DFGray wrote:
    You can create something in LabVIEW to do this, but it won't be trivial. Here are some things to point you on your way. I have not done this, so it is pure speculation on how I would go about solving this problem.
    You will need to know ahead of time the maximum number of windows you will want. On your front panel, create that many individual subpanels. You can hide the border and make them transparent so you never see them unless something is in them.
    When you load a VI into the subpanel, all you get is the panel, not the title bar. You will need to create a title bar with buttons and any border you want on the VIs in the panel area. This is tedious, but fairly straightforward, especially if you use system colors to make it look like a real title bar/border. You won't be able to make it look like an XP title bar unless you use bitmaps/picture control. If you go that route, you can probably even mess with the color map to change the bitmap colors when the system color changes (have to poll, no event for system color change).
    You can resize and move the subpanels using property nodes. Getting the info to do this could be tricky, however, since you may be coordinating mouse events from the top level VI and the VI hosted in the subpanel. Should be doable, though.
    One other method is to use floating windows, but move them on top of your main window so it appears to the user it is an MDI. You won't get clipping, but everything else will look the same and you won't have to jump through hoops to create title bars, etc. You will have to write a position manager to maintain the window positions, but that is probably easier than the tricks I discussed above
    Good luck. One final question - do you really need an MDI? Floating windows with clear labels are a lot easier. Do some polling of your users to find out what they like best, then go for it.
    You should using windows reparenting functionality through windows api dll calls. Reparenting is documented well on microsoft.com. Reparenting is how Excel opens multiple worksheets inside the Excel "parent" window. I have done this on a few of projects and it works far better than subpanels because it allows you to drag windows around within a parent application. They are also far easier to work with once you get the reparenting vi's correct (you have to do some messing with Z position and window activation to get them to repaint properly) because unlike with subpanels you can view a VI diagram while it is reparented with no problem. With subpanels I have also had problems with GUI controls driving event structures when a vi is in a subpanel.
    -Devin
    I got 99 problems but 8.6 ain't one.

  • How can I put text on top of a graphic in Framemaker 11?

    I am using Framemaker 11. When I import an image from Photoshop (EPS file) and put a text box on top, I can't get the text to be on top of the graphic without jumping to the next page. Is there a setting that I'm missing in Framemaker? The image is just borders, like a frame, and I'm trying to put the text inside the blank space.

    I suggest you use the text frame tool (to the left of Arnis' supplied screenshot) and set the background of the text frame (the diagonal b/w lines below the text frame tool) to None.
    When all else fails, add the text to the graphic, save as PDF or other appropriate format, and place as needed.
    -Matt
    Matt R. Sullivan
    co-author Publishing Fundamentals: Unstructured FrameMaker 11

  • How can I put text (in perspective) round two sides of a 3d object?

    If I have a block of text that I want to wrap across two planes of a 3D building, how do I do that...while keeping both sides in perspective on the respective planes.
    Suppose I want a letter to be split in the middle so that part is on one plan and part on the other- how do i do that?
    Is the only way by i) creating outline ii) do a vertical path and divide? iii) then re-group text in some way?

    I want to wrap across two planes of a 3D building,
    You do understand, don't you,  that the Perspective Grid is just a 2D drawing guide/distortion? It is not an actual 3D model.
    JET

  • NEWBIE: How can I put a forum inside my site design? LOOK

    Let's say I signed up for one of those free forums online.
    How would I make it appear to be a part of my site design as seen
    here?
    http://www.soulstrut.com/ubbthreads/ubbthreads.php
    Any info would be greatly appreciated!

    It would all depend upon whether you free forum came with the
    ability to
    apply a skin to it so that you could make it like the rest of
    your site.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "Ace612" <[email protected]> wrote in
    message
    news:ephqj4$2k4$[email protected]..
    > Let's say I signed up for one of those free forums
    online. How would I
    > make it appear to be a part of my site design as seen
    here?
    >
    http://www.soulstrut.com/ubbthreads/ubbthreads.php

  • How can I put text in Tab into vertical alignment??

    Dear friends, I have following code,
    package com.swing.test;
    import java.awt.BorderLayout;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JTabbedPane;
    import javax.swing.SwingConstants;
    public class NewTabbedPane {
         private JFrame frame;
          * Launch the application
          * @param args
         public static void main(String args[]) {
              try {
                   NewTabbedPane window = new NewTabbedPane();
                   window.frame.setVisible(true);
              } catch (Exception e) {
                   e.printStackTrace();
          * Create the application
         public NewTabbedPane() {
              initialize();
          * Initialize the contents of the frame
         private void initialize() {
              frame = new JFrame();
              frame.setBounds(100, 100, 500, 375);
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              final JPanel panel = new JPanel();
              panel.setLayout(new BorderLayout());
              frame.getContentPane().add(panel, BorderLayout.CENTER);
              final JTabbedPane tabbedPane = new JTabbedPane();
              tabbedPane.setTabPlacement(SwingConstants.LEFT);
              panel.add(tabbedPane, BorderLayout.CENTER);
              final JTabbedPane tabbedPane_1 = new JTabbedPane();
              tabbedPane.addTab("AAAAA", null, tabbedPane_1, null);
              final JTabbedPane tabbedPane_2 = new JTabbedPane();
              tabbedPane.addTab("BBBBB", null, tabbedPane_2, null);
              final JTabbedPane tabbedPane_3 = new JTabbedPane();
              tabbedPane.addTab("CCCCC", null, tabbedPane_3, null);
    }but here all tabs' title AAAAA, BBBBB, CCCC are aligned horizontally, I need them to align vertically, Any guru can help??
    Thanks
    sunny

    there's an example here (works OK on winxp)
    http://www.macdevcenter.com/pub/a/mac/2002/03/22/vertical_text.html
    Test() class needs a small change, for the direction you want
    //panel.add(makeTabpane(null, sEnglish, VTextIcon.ROTATE_DEFAULT));
    panel.add(makeTabpane(null, sEnglish, VTextIcon.ROTATE_LEFT));

  • How can I put text into a cell with a formula?

    I'm trying to sort a budget in Numbers 3.1. I have a sum of column of cells that I'm adding up. The cell that has a total number looks like this: =SUM(F). I want to have that sum have a $ sign in front of it. I've ready everywhere that I could do ="$" SUM(7), but that doesn't work in 3.0, only in Numbers 09 I guess. Is there a new solution for 3.1?

    Tyna,
    Just Format the cell as Currency.
    Jerry

  • How can i put my own text sound

    i need help, how can you put my own text message sound in my iphone....p.s i'm new the the apple family

    Welcome to the family. Tell your Uncle Steve you would like custom text tones: http://www.apple.com/feedback/iphone.html

  • How can I put add text to an iTunes Album cover?

    How can I add text to an i Tunes album pohoto, both front and back?

    Renee Clark wrote:
    Preview Help says I can add text to an image by clicking Annotate and then Text, but I can't get anything to work.
    Select the menu option Tools -> Annotate -> Add Text. The cursor should change to a "cross-hair". Use that to draw a rectangle, then type.

  • How can I put my icloud photos to camera roll or photo stream?

    I got a nee iphone, i backed up everything and restored it into mu new iphone, but the pictures didn't restore so i did it manually but now on my phone i got different albums icloud photo stream and camera roll. How can i put the icloud picture into camera roll or photo stream. Any ideas?? On my old iphone ive deleted everything.

    Hello Ozzie94,
    Thanks for the additional information. The camera roll is designed for photos taken on your device, or saved images from Mail and other applications. Photos synced from a computer are organized into their own album(s):
    View photos and videos - iPhone
    http://help.apple.com/iphone/7/#/iph3d267610
    - Camera Roll—photos and videos you took on iPhone, or saved from an email, text message, webpage, or screenshot
    - Shared photos and videos—Photos and videos that you’ve shared with iCloud Photo Sharing or that others have shared with you (see iCloud Photo Sharing)
    - Photos and videos synced from your computer (see Sync with iTunes)
    Additionally, you may find more information by using another one of Apple's support resources - https://getsupport.apple.com
    Thanks,
    Matt M.

Maybe you are looking for

  • Want to boot XP from an external disk? Here's how:

    Has to be a USB 2.0 drive: http://forum.onmac.net/showthread.php?t=1015 By: gradenko Source: www.onmac.net [edit: you have to keep the 5GB NTFS parition on your internal drive for this to work] Hello, I cannot find a working solution for this posted

  • Issue with privilege grouping in AC Validation task

    Hi Experts, We are using GRC AC Validation Task on repository events.Assignment grouping privilege on repository is set as "Grouping- separate by application". While assigning the multiple privileges in IDM, only one access request with multiple role

  • Issue with filtering KPIs through perspectives in a Tabular model

    I am having issues with trying to filter KPIs through a perspective.  In my fact table, I have three KPIs created out of SumOf measures.  There are three different user groups, and one user group wants a KPI specifically for their area, so it should

  • How does 0SOURSYSTEM Souce system Id get filled?

    Hi Gang, How does 0SOURSYSTEM Souce system Id get filled? I'm trying to recreate some transfer rules which were deleted. Is there an ABAP program or transfer program to populate this field? Or do I hard code a value? Thanks, John Hawk

  • Budgetary Ledger is used without Periodic Based Encumbrance Tracking

    Hello dear experts, If I post any budget document as a fund reservation (FMX1) a fund precommitment (FMY1) or a fund commitment (FMZ1) the systems shows the following error message: Message no. FMFG_BLCORE030 "Budgetary Ledger is used without Periodi