Displaying 4 Text Areas in Swing.Help required.

Folks
I need to define 4 Text Areas in Swing in the following pattern:
1 -- 2
3 -- 4
where 1,2 3 and 4 are TextAreas,
As of now I can get 2 text Areas :1 and 3 only by the following code:
public class 4TextAreas extends JFrame
private Container c;
Box b = Box.createVerticalBox();
msgTextArea = new JTextArea(10,15);
b.add(new JScrollPane(msgTextArea));
msgTextArea_2 = new JTextArea(10,15);
b.add(new JScrollPane(msgTextArea_2));
c = getContentPane();
c.add(b);
setSize(250,250);
this.show();
Please can any one help as to how to get TextArea 2 and 4 please.
Do I need to crate another Box object called b1?
Please reply.

You could try creating two vertical boxes, adding two textareas to each and then add the vertical boxes to a horizontal box. ( or two horizontals to a vertical, of course).
Also you could try a different layout manager such as a gridlayout or gridbaglayout.
Cheers
DB

Similar Messages

  • I am having bugs with the ios 5, after it got the update it is unable to make outgoing calls. in-place the incoming and outgoing texts are working please help me asap...!

    i am having bugs with the ios 5, after it got the update it is unable to make outgoing calls. in-place the incoming and outgoing texts are working please help me asap...!

    Sometimes and this is network dependant if they suspect the phone to be lost or stolen as in this case with change of Sim card and provider then the origonal network can and some will block the phone untill you have rang them and proven it's not the case or if you have bough this 2nd hand then the origonal seller may have stopped paying the contract bill and thus the phone is blocked

  • Display Text Area as Read Only

    Hello,
    I have about 5 forms, some of the forms have text areas with counters. All of my text area fields are pretty much set up the same way:
    width = 75, height= 6, max width = 500.
    When a user logs in with read only priv. the text areas turn change to read only. The problem is when I enter some data into a text area it will display across the screen. I need the text area to do word wrap. I have tried the following in the Read Only Element Table Cell Attribute.
    display:block; width: 400px; word-wrap: break-word; overflow:hiddenI have also tried to add some CSS to my HTML Header, which adds borders to all of the fields, which is not wanted and it doesn't word wrap.
    <style type="text/css">
    span.display_only {border:2px inset #D4D0C8; padding:1px 0px;}
    </style>Any help, is greatly appreciated.
    Mary
    Edited by: MaryM on Aug 25, 2010 11:58 AM

    They are page items all of them have character counters. The problem, comes when a user logs in with Read Only privelages, then the text area's turn to Read only. For example, if I enter something in the text box like (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxeeeeeeeeeeeeeeeeeeeeeee) it will display across the screen when a Read Only user logs in and looks at it. I need it to word wrap, when it is in Read Only mode. It will also display the same way if I change the field type to Display as Text ex: (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee), it will not word wrap.
    All of my text area boxes are varchar2 (300) or more in length. I need to be able to word word wrap. I was able to do with classic reports, using standard report columns and in the css I added the following:
    display:block; width:400px;word-wrap:break-word;overflow:hidden.Hope I explained this better.
    Mary
    Edited by: MaryM on Aug 25, 2010 12:25 PM

  • Displaying a matrix in swing----HELP!! :)

    Hello I want to print out values from a matrix in some sort of table.
    javax.swing.JTable is almost what I want, but you can't do row labels (only column labels, I think)--
    Are there any classes like JTable, but a little more like an Excel spreadsheet where you have labels on the columns and rows???
    Or any other suggestions for displaying matrix values with swing would be helpful!!
    THANKS!!!!

    .

  • Display Text Area and Text field in same line

    All,
    Please help with this scenario.
    I have 3-4 text fields, which are all on NEW LINE. I want a text area adjacent to these 4 fields.
    How to achieve this.
    Thanks and Regards,

    Hi,
    OK - My Textarea item is immediately after the first normal Text item in sequence numbers (the first item is sequence 10 on my page and my textarea item is sequence 15).
    The only settings I changed on my TextArea item are:
    Begin on new line: No
    HTML Table Cell Attributes (Element section): rowspan=4
    This second setting merges together 4 table cells in one column into a single cell
    Andy

  • Display text area for printing

    Hi,
    I know here are many threads about displaying a textarea as read-only. but no solution fits my requirements.
    I have a page with many fields among other things 3 textareas. This textareas a normally display as autoheight. for printing this page I have created a new one, where all items are read-only, because of the nasty brackets, if page is displayed in printer-friendly mode.
    If my textareas hve more lines then declared for height, they are displayed with a scrollbar. That's not acceptable for me , because I must have printed all the text, not only the one in the scrollable area. In printer-friendly mode, the textarea is automatically set to a height, so that the text is completly shown.
    When I print this page, the textareas are set to a width of 17 lines (declared in height: 4 lines), equal if there is 1 line entered or 20. But I like to have shown / printed all entered lines, so if 1 line is entered I like to see / have printed a textarea with 1 line (max 3) and if 20 lines are entered I like to see / have printed a textarea with 20 lines (max 22). How can I do this???
    Thanks
    chrissy

    Chrissy,
    There might be a way to get this functionallity through the css and template for 'Printer Friendly'.
    However, what I'd do is write a PL/SQL routine to create a HTML page and get all the formatting done the way you like there. I have mine pop up in a new window with the menu bar, so the print option is available if the user wants.
    Through PL/SQL you're dealing just with the column data, not also having to deal with the various elements to display the data, such as a textarea. I simply create HTML tables to hold the data, and place the data in the various <td> elements of the table. The table then controls the layout, and multi-line fields get automatically wrapped.
    Bill Ferguson

  • How to display text file in  swing

    hello,
    I have screen where user enters batch number and number.
    when key is pressed a list is displayed on the screen.how to do this and how to relate my actionlistener with the function that generates the list...

    Hi,
    It is simple. Just create a button and add it to the action listener as button.addActionListener(this);
    Your class should extend ActionListener. and also there should be a method named - actionPerformed(ActionEvent avt) in your class
    Now inside this method, just compare the action as:
    if(avt.getSource()==button)
    // in this method, hjust take your file contents and display it on the same window, or create a new Frame here and display it in that window.
    If you want to display the file contents in the same window, then do the following.
    Declare a public JLabel variable for the class and create the JLabel along with the other components as usual but without giving any values. Now in the action part of the button, read the file contents in a string variable, and set the string to the jlabel as folows:
    label.setText(string);
    Hope it helps,
    Cochu.

  • Which event dispatched after text selection done on spark text area in Apple iPad using Adobe Flex 4

    I need to know which event triggered after text selection done in Apple iPad. This way i have done in desktop air app code (mouse events)
    protected function txtEditor_mouseUpHandler(event:MouseEvent):void
                if(txtEditor.selectionAnchorPosition != txtEditor.selectionActivePosition){
                    showNoteToolBar(event);
                    txtEditor.focusEnabled = true;
                    txtEditor.setFocus();
    But in Apple iPad how to achieve through "Touch Event" ? And also i need how to hide all context menu on Spaek TextArea?. Why Touch.End event is not fired after place cursor on text area ?
    Please help me !

    Ok, so I finally got it working but this is not ideal at all. Adobe really needs to give us some direction on how to properly deal with font embedding and TLF now that the release build breaks all functionality with loading runtime fonts and TLF.
    Problem:
    I am embedding collections of fonts (faces) into single family classes. Each individual face is registered with Font.registerFont(). I need to do this because I have to have mixed fonts within text flows - at least according to Alex H's recent blog post.
    Fonts do not display in TLF without doing the following:
    1. GlobalSettings.resolveFontLookupFunction = null;
    2. editor.textFlow.flowComposer.swfContext = ISWFContext(this.getFontContext("AnyFamilyNameFromAnyFontEmbedded", false, false, FontLookup.EMBEDDED_CFF));
    3. Instead of #2, use editor.textFlow.invalidateAllFormats();
    Either #2 or #3 need to be performed. If I have a spark richEditableText control in MXML with defined familes from the loaded fonts. I even tried placing the control into a separate state so it wasn't created until after the fonts were loaded... I still needed to invalidate the formats or set the context.
    The "AnyFamilyNameFromAnyFontEmbedded" does not need to be all of the embedded family names. It only needs to be one of them. Once one is used, all embedded fonts work. Also, I have to use the internal namespace to even get access to getFontContext, another oddity that, in my humble opinion, should never be necessary to create mixed style TLF content.
    My questions are then:
    1. Why am I required to use ISWFContext if I am using Font.registerFont()?
    2. Why is GlobalSettings.resolveFontLookupFunction = null; also required for this to work?
    3. What is the recommended workflow to embed fonts from multiple SWF files into the release build and have it work without having to jump through all these hoops?

  • Passing values to the TEXT AREA in .HTML page.

    Hi,
    I have data in internal table and in context node in custom CRM component.
    I want to display this data in the textarea field. Is it possible to display this data in the text area? Should we use JAVASCRIPT for this one?
    Can anyone please give me the smaple code for passing the values to the text area?
    Please help me.
    Regards,

    Hi Pushpa,
    You can set the internal table values to the text area field using SET_PROPERTY method .
    Check for the context node in which that text field is there ,then get that context nodes current entity .Next set required values to that text area field.
    Regards
    Anitha

  • Can a script manually insert a delete (or backspace) into a text area?

    I'm new to action script, so this may have a simple answer, sorry if that's the case.
    I have a little movie created with a simple purpose of trying to mimic a system like cell phones have for character input.
    There are two text areas, one hidden off the screen that accepts the input from the user; a second text area in on screen and displays what the user had entered after some basic processing on the input.
    The hidden text area is pretty basic with listener that is responsible for grabbing the input keys and then mangling them to be inserted into the displayed text area based on the cell phone text entry multi-tap rules. Example user press 2-2-2  and the hidden input accepts 222 and then appends 'C' to the display text area. That's working great, but I have a problem if the user wants to delete from the display text area. I can't find a way to insert a delete or backspace key into the display text area. I've tried using StringFromCharCode (8) // Key.BACKSPACE, but that doesn't work. That just displays one of those undefined glyphs. I figure that things like clear, and delete are handled somewhere higher in the input chain and that's where I'm having a problem.
    I've looked, but I can't find a way to delete a single character from the text area. I was thinking if I could find the cursor location that I could just use some delete character method to get the job done, but I couldn't find how to do that.
    Any ideas on how to pull off manual delete function in a text area?

    Ned, I do really want to manually (by method of code) trigger a delete in a text area. The delete (or backspace) that I want added to the text area isn't directly entered by the user, it's the result of several key presses by the user. That's why I called it "manual" because it's done by the code, not by the user's direct input.
    Think about how text entry works on most phones... if you want to enter a letter you have to cycle through all the letters on a single key until you get to the character desired. As I stated before, if you want a 'c' you need to press 2 button 3 times. This is basically what I'm trying to do, but I want to add the ability to delete a character too if the correct sequence in entered, for example a sequence of ### would equal a backspace.
    Rothrock, I think you were thinking the same thing that a single key is used to do a backspace.
    I was thinking that I could possibly insert key event into the event queue for the text area to process, but I wasn't sure about that.
    Sorry, if this is confusing, I know it's not a straight forward design. I need onscreen and offscreen text areas with the onscreen one acting as a slave of the offscreen one.
    The way the code currently works is hidden text area had a listner that responds to changes, and that handler processes the key entered and deletes that character from the hidden text area. After the full sequence of characters (say 2 button has been pressed 3 times) the handler then sends the resulting character into the display text area. This part of the code works great. I can add any character including some specials like tab and newline. However if I want the text area to delete a character I don't have a way to do that. That's why I tried to insert the backspace key (0x08 or ^H, for other oldschoolers), but using that as a char code or string from char code doesn't work.
    I had also tried to create to set the focus to the display text area then create and dispatch a backspace keydown and keyup events to the visible text area and then return the focus back to the hidden textarea, but... no luck.

  • Drawing a colored cursor on a text area given coordinates

    Hi all,
    Does anybody know how to draw a telepointer ( ie. a small coloured arrow like the cursor) given point coordinates on a text area? Please help.

    This may help... just set the transparency in the png or use a gif
    Image cur = getImage(getDocumentBase(), "cursor.png");
    Cursor myCursor = Toolkit.getDefaultToolkit().createCustomCursor(cur, new Point(0, 0), "name");
    textarea.setCursor(myCursor);

  • To limit the words usage in text area

    Hi there,
    Can u help me. How can I limit the usage of words in the text area?
    Your help very needed.
    thanks

    here's a tutorial that introduces the idea of a document filter
    http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html#filter
    kind regards
    walken

  • Read Only Display of Radio group and Text area with counter not working

    Hello,
    I am using Apex 3.2, with 10g for the database
    I have this form, with fields that will set to read only when status = 'closed'
    All of the fields display as read only except for 2. I cannot figure out why this is not working correctly.
    1st field is Issues that is a text area with character counter, with a sql query behind it, that is set to null unless the query is pulling in the data.
    2nd field is Status which is a radio group that will not display as read only when status = 'closed'
    I have other fields on the form with the same format and they change to read only when the status = 'closed', I have even copied the pl/sql expression from one field to these fields and it still doesn't work correctly. I have also tried javascript for an on load event, which works, but once I click on the save button, it disables all of the page items, which works correctly, but I purposely forget to enter information, to make sure the validations are firing correctly, which it does, but the script disables everything, not allowing me to correct the errors. The javascript is firing on the on page load event.
    Any help on this is greatly appreciated.
    Mary

    Dung,
    That API seems to have a bug, it returns true/false/null, so you could use 'return not nvl(htmldb_util.current_user_in_group(p_group_name => 'APP Admin'),false)' to get a false value.
    Unfortunately there's another problem: using the read-only attributes for checkbox or radiogroup item makes them hidden. My suggestion would be to create another item that has disabled="disabled" in the HTML Form Element attribute in the item definition and display that item or the non-disabled item alternately, using conditions based on the current_user_in_group logic.
    Scott

  • My 4S has stopped ringing. Voicemail's disabled but if you call me, you'll hear it ring your end but it does nothing at mine and freezes if I make a call. Texts are not being delivered or coming through delayed. Ringer is on, tone enabled - help!

    My iPhone 4S has stopped ringing altogether. Voicemail is disabled but if you call me, you'll hear it ringing at your end but it does nothing my end and freezes in the phone app if I make a call (doesn't ring or connect and doesn't freeze the phone, just the calling part). Texts are not being delivered or coming through delayed. Ringer is on, tone enabled - help!
    I've disabled roaming so it only runs on wifi (this after getting a £4k phone bill...) and I can use Skype, Viber and WhatsApp with no problem at all.
    Would really appreciate any help at all!
    Many thanks.

    Hi there - am with Orange and they said nothing wrong with account and service running normally.  They said if they had cut me off I would've received a text (debatable with current message receiving situation!) and when I called out it would say 'calls from this number are barred'.  Also if you called me it would say something similar.  But it doesn't, it will ring and ring until it rings off but nothing happens at all on my handset. Not even a missed call notification.  If I call out, it will display that it is calling the number but that's it.  If I cancel the call it will constantly display 'ending call'.  If I come out of the phone and go to another app then revist phone it will start calling that last dialled number - without ever getting as far as ringing or connecting.

  • How do I retrieve all data from a table and display it on a text area?

    I want to retrieve all the data from one of my MS Access data table and display them all in a text area. how do i go among doing this?
    In my car table i have the fields lined up like this..
    license,color,doors and year_made
    I have an Object class called CAR that will contain methods to set the data from these fields when it gets retrieved.
    here's what i go so far.....
    statement = getDBConnection().createStatement();
         rs = statement.executeQuery("select * from car");
         boolean moreRS = rs.next();
    if(moreRS)
    car.setLicense(rs.getLong(1));
         car.setColor(rs.getString(2));
         car.setDoors(rs.getString(3));
    car.setYearMade(rs.getString(4));
    //but this will only get me one car. How do I get more car data?
    HELP!!

    Vector cars = new Vector();
    while (rs.next()) {
      String license = rs.getLong(1);
      String color = rs.getLong(2);
      String doors = rs.getLong(3);
      String year = rs.getLong(4);
      myTextArea.append(license+"\t"+color+"\t"+doors+"\t"+year+"\n");
      Car car = new Car();
      car.setLicense(license);
      car.setColor(color);
      car.setDoors(doors);
      car.setYearMade(year);
      cars.add(car);
    }t=tab
    n=newline
    Vector: http://java.sun.com/j2se/1.4.1/docs/api/java/util/Vector.html

Maybe you are looking for

  • "Scheduled for Outbound processing" message

    Hi, My scenario is: R/3 (IDoc Customer) -> XI -> PC (file) and I use a BPM with option "multi to single". In the Message Monitoring, I have two steps: 1. Idoc DEBMAS06 --> BPM: status = "Processed successfully". Thus it's ok. 2. BPM --> my PC: status

  • Chart from SQL Colour

    I am creating reports in information publisher and wish to include charts from SQL to summarise the data. As some of these reports will include job execution status and similar status fields it would be useful to show Failures in Red and Successes in

  • Special characters pop-in

    i have to do my homework in latin. i have the special characters pop-up available, but have to insert each character individually. is there any way i can assign these characters to my keyboard so i can just continue typing everything? it works in MS

  • Why do I hear a rattling sound in my iPhone 5 when I lightly shake it ?

    Why does my iphone 5 make a rattling noise when I lightly shake it or move it ? It's a faint sound but it's brand new this should not happen?

  • Import/Export pdf help - about to return the program :(

    I bought the program because I was told I can import a pdf and export it as a pdf/x-2002. I have read through threads and troubleshooting tutorials and I have not seen anything on how to do this. Please help! I'm about to return the program.