Having trouble with multiple lines of text in a JTable

Hello,
I am trying to use a JTable rather like a table in Word so that as I type text into a cell that row of cells grows in height to accomodate the text typed.
I used custom cell editors and renderers to put a JTextField (I think it was) into each cell. These allow the entry of more than one line but the row height is still wrong. So I interceot every key press and work out the height of the custom editor, and set the row height to the max of the cells in the row on each key depression. However, this is a very clunky solution and also does not cope with cell resizing.
I can't believe that it is this hard to get cells/rows that resize in response to typing. So I'd be grateful if someone knows of a better way of doing this.
Many thanks in advance...
Gary

I've never tried it buy you can read the Swing tutorial on "How to Use HTML is Swing Components":
http://java.sun.com/docs/books/tutorial/uiswing/TOC.html

Similar Messages

  • Having trouble with multiple lines

    I'm trying to fill out this form for an application that is a read/enter/print only PDF, and I got to a multiple line box and instead of being able to enter text in line for line, when you try to enter text it shows as one big format which I can't change. Illustration below:
    http://i.imgur.com/Yukk8.jpg
    I don't know if it's some setting I have wrong or they didn't make the text box right or what, but I need to know if there's anything I can do to fix it because they mandated that the form be filled out electronically. Thanks in advance.

    I can't say for certain without looking at the actual PDF but it does appear that they created one large text box over multiple lines. For a fillable form it may have been smarter to remove the lines and create a box with smaller text that supports multiple lines.
    At any rate, nothing you can do about it with the free Reader (and depending on the security, maybe nothing with Acrobat either.)

  • Having trouble with multiple user accounts

    I am still getting used to Aperture and am having trouble with multiple user accounts on my Mac.
    My wife and I have separate accounts on our Mac, and both have Administrator rights. We keep our Aperture library in the "Shared" folder, and I have made sure that both she and I have read/write capabilities on the Aperture library.
    However, she has difficulty creating new projects, saving data, and viewing thumbnails in Aperture. Whenever she creates a project, it does not save into Aperture, and cannot be viewed by any user. In addition, changes she makes to photos do not save. She also cannot view thumbnails of any photos (although she can see the photos in the viewer).
    Are there any changes I need to make to the user accounts so she can have all these capabilities?
    Many Thanks.

    Rather than having the Aperture library reside in the shared folder, keep it within a folder residing at the top level of your mac, eg.
    I actually keep mine on one of my RAID disks.
    Tony

  • I M HAVING TROUBLE WITH MY ILLUSTRATOR. mY TEXT IS NOT GETTING SELECTED

    I M HAVING TROUBLE WITH MY ILLUSTRATOR. mY TEXT IS NOT GETTING SELECTED

    supd,
    By the sound of it, ti could be View>Show Edges or View>Show Bounding Box,
    or it could be locked object(s)/Layer(s),
    or the text could be hidden within a Clipping mask or something.
    Have you tried (Alt/Option) selecting with the Direct Selection Tool?
    Have you looked into the relevant expanded Layer(s) in the Layers palette?
    What happens if you Select>Object>Text Objects?

  • How can I produce a title card with multiple lines of text?

    When I drag "title, multiple lines" to my timeline, the second line appears in a smaller font. When I type all my text on a single line, the title appears in a teeny-tiny font. I want to be able to produce four or five lines of text, all in a readable font. Help!

    2 solutions:
    Costs money and takes work:
    Look for a title plug-in on geethree.com. There are free ones out there too.
    OR.
    Works right now:
    Type your title into the 'scrolling block' title.
    Drop it in and let it render.
    Play it back and pause it when the text is in the middle (or where ever you want it). Choose 'create still clip' from the edit menu. And blamo! You've got multiple lines of the same sized text.
    This might take some experimenting to find what font works best. Some get a little jaggy in the rendering process and look bit-mapped a bit when changed into a still.
    Give it a shot!

  • JList with multiple lines of text

    Hello everyone,
    I have a JList where I want to put in every cell of the JList a text of 5 lines. Does anyone know how to do that? Thank you

    http://java.sun.com/products/jfc/tsc/tech_topics/jlist_1/jlist.html
    The JList component implements Swing's modified model-view-controller (MVC) architecture, which is described in "Getting Started with Swing." Separate delegate "model" objects define the contents of the list and the indices of the currently selected list items.
    Another characteristic of JList is that it delegates the rendering of individual list items, or cells, to a ListCellRenderer object. The JList API was structured this way to provide enough flexibility for a wide variety of applications.

  • Having trouble with multiple rotations around an objects poles

    Hey all, i am new to java 3d (only started coding today) but i have been coding in Java for a while..
    I am having a problem understanding how to perform the rotations i want to. I have read the majority of the literature i can find on performing these kinds of rotations. I realise that i need to have correctly linked nodes in the graph so that i am rotating around the correct points and i think i have accomplished this. However, i cannot get the system to rotate around the objects poles. To clarify, i can get the object to rotate around one of its poles (x , y, z) in some cases but trying to do multiple rotations causes problems.
    import javax.media.j3d.Appearance;
    import javax.media.j3d.BranchGroup;
    import javax.media.j3d.ColoringAttributes;
    import javax.media.j3d.PolygonAttributes;
    import javax.media.j3d.Transform3D;
    import javax.media.j3d.TransformGroup;
    import javax.vecmath.Color3f;
    import javax.vecmath.Vector3f;
    import com.sun.j3d.utils.geometry.ColorCube;
    import com.sun.j3d.utils.geometry.Cylinder;
    import com.sun.j3d.utils.universe.SimpleUniverse;
    public class TestRotation
         private TransformGroup objectTranslateGroup, objectRotationGroup;
         private Transform3D translate = new Transform3D(); private Transform3D  rotX = new Transform3D();
    private Transform3D rotY = new Transform3D()
    private Transform3D rotZ = new Transform3D();
         private double rotationX, rotationY, rotationZ, newRot = 10;
         private SimpleUniverse u;
         public TestRotation()
              // Create the root of the branch graph
              BranchGroup objRoot = new BranchGroup();
              rotationX = 0; //init rotations
              rotationY = 0;
              rotationZ = 0;
              ColorCube cube = new ColorCube(0.25f);
              Appearance x = new Appearance();
              Appearance y = new Appearance();
              Appearance z = new Appearance();
              x.setColoringAttributes(new ColoringAttributes(new Color3f(1,0,0),ColoringAttributes.SHADE_GOURAUD));
              y.setColoringAttributes(new ColoringAttributes(new Color3f(0,1,0),ColoringAttributes.SHADE_GOURAUD));
              z.setColoringAttributes(new ColoringAttributes(new Color3f(0,0,1),ColoringAttributes.SHADE_GOURAUD));
              Cylinder poleX = new Cylinder(0.02f, .75f, x); //RED
              Cylinder poleY = new Cylinder(0.02f, .75f, y); //BLUE
              Cylinder poleZ = new Cylinder(0.02f, .75f, z); //GREEN
              Transform3D poleXTransform = new Transform3D();
              Transform3D poleYTransform = new Transform3D();
              Transform3D poleZTransform = new Transform3D();
              poleXTransform.rotZ(Math.toRadians(90));
              poleZTransform.rotX(Math.toRadians(90));
              TransformGroup poleXTransformGroup = new TransformGroup(poleXTransform);
              TransformGroup poleYTransformGroup = new TransformGroup(poleYTransform);
              TransformGroup poleZTransformGroup = new TransformGroup(poleZTransform);
              poleXTransformGroup.addChild(poleX);
              poleYTransformGroup.addChild(poleY);
              poleZTransformGroup.addChild(poleZ);
              translate = new Transform3D();
              translate.setTranslation(new Vector3f(0,0,0)); //init position
              rotX.rotX(Math.toRadians(rotationX));
              rotY.rotY(Math.toRadians(rotationY));
              rotZ.rotZ(Math.toRadians(rotationZ));
              objectTranslateGroup = new TransformGroup();
              objectTranslateGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
              objectRotationGroup = new TransformGroup();
              objectRotationGroup.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);
              objectRotationGroup.addChild(cube); //add the object to the rotation group
              objectRotationGroup.addChild(poleXTransformGroup); //add the object to the rotation group
              objectRotationGroup.addChild(poleYTransformGroup); //add the object to the rotation group
              objectRotationGroup.addChild(poleZTransformGroup); //add the object to the rotation group
              objectTranslateGroup.addChild(objectRotationGroup); //add the rot group to translate group
              objRoot.addChild(objectTranslateGroup); //add to root
              u = new SimpleUniverse();
              u.getViewingPlatform().setNominalViewingTransform();
              u.addBranchGraph(objRoot);
              this.begin();
         private void begin()
              while(true)
                   //rotationX += newRot; //rotate slightly
                   rotationY += newRot;
                   rotationX += 0; //rotate slightly
                   //rotationY += 0;
                   rotX.rotX(Math.toRadians(rotationX));
                   rotY.rotY(Math.toRadians(rotationY));
                   rotZ.rotZ(Math.toRadians(rotationZ));
                   rotY.mul(rotX); //multiply rotations
                   rotZ.mul(rotY);
                   objectRotationGroup.setTransform(rotZ); //update
                   try {
                        Thread.sleep(300);
                   } catch (InterruptedException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              new TestRotation();
    }As you can see the code is a full class so you can copy and paste it to run it... In the 'begin' method you will notice the variables that update the rotation, currently when the cube rotates on the y axis the cube is rotating around the viewers Y axis and not around the objects y pole. However, if you change the values so the cube is set to rotate around the X axis then it will treat the x axis as the objects x pole and not the viewers x axis. I presume this is because of the multiplication of the matrices.
    What i want to know is how can i set it so that if i say rotate around the y axis it rotates the cube around its y axis (as in the y pole) regardless of where the y pole is. Not only that but i need to be able to rotate around multiple axis ensuring that it is rotating around the objects poles correctly.
    The reason for this is that the object will be turned into an auv (underwater vehicle) fitted with thrusters which are going to turn the vehicle so no matter how the vehicle is positioned (facing up, upside down etc) the thruster always rotate around the same axis on the block.
    Hope this makes sense, sorry for the long post!!
    edd
    Message was edited by:
    edwardr

    Since the 2-Wire gateway is providing both modem and DHCP services, you would want to insure that the Time Capsule is not also configured to provide DHCP services as well.  If this were the case, that would mean two routers are trying to do the same thing on the same network. You only want one device on a network performing as a router.
    The reason for this is that a two router setup is likey to create IP address conflicts on the network, which likely may be your issue.
    To check, open Macintosh HD > Applications > Utiltiies > AirPort Utility
    Click on the Time Capsule icon, then click Edit
    Click the Network tab at the top of the next window
    Insure that the setting for Router Mode is set to Off (Bridge Mode)
    Click Update to save the correct setting
    Then power cycle the entire network by powering off all devices in any order that you want
    Wait a minute
    Start the 2-Wire gateway first and let it run a minute by itself
    Start the Time Capsule next the same way
    Continue starting devices the same way until everything is powered back up.
    Power off the entire network...all devices...and wait a minute

  • I'm having trouble with multiple speaker connections in iTunes?

    Home network running through a Time Capsule:
    1. MacBook
    2. Apple TV (Living Room)
    3. Apple TV (Bedroom)
    4. AirPort Express (Connected to speakers in Kitchen)
    Issue:
    In iTunes I can see and play muisic through all my Apple TVs and the AirPort Express station. However, when I want to connect to multiple speakers (locations) The only two iteams that show up are a single Apple TV (bedroom) and the computer. I can't figure out why my AirPort Express or the other Apple TV (Living Room) will not show up? All my devices have the most recent updates, and function properly as far as connectiong and playing music individualy.
    Can anybody help me figure out why the second Apple TV or AirPort Express won't show up in the "mulitple speaker" selection dialog box?
    Cheers,
    Acolle

    Now my new issue is they are not perfectly synchronized from station to station! What a bummer!
    I wonder if the older Airport Express, hooked up to my kitchen speakers only, with a differerent network performance profle than the new Apple TVs, is to blame?

  • I'm having trouble with this line: public function initHandler(event:EVENT):void

    I'm building a simple photo gallery in Flash CS4 & I've posted the entire code below, if anyone can see the problem in this code, please let me know....thanks. This code is actually from a tutorial: http://blip.tv/file/1620128/
    The tutorial had no issues with this code so I'm wondering if its just a matter of correcting a property or setting somewhere.....
    package videocode
        import flash.display.*;
        import flash.events.*;
        import flash.net.*;
        public class videoview extends MovieClip
            public var source:*;
            public var loader:Loader;
            public var loaderIndex:Number = 1;
            public function videoview()
            loader = new Loader();
            loader.contentLoaderInfo.addEventListener(Event.INIT, initHandler);
            addChild(loader);
            loadImage();
            public function initHandler(event:EVENT):void
                source = loader.content
                source.alpha = 0;
                source.x = videoarea_mc.x;
                source.y = videoarea_mc.y;
                addEventListener(Event.ENTER_FRAME, enterFrameHandler);
                protected function changeHandler(event:Event):void
                    loaderIndex = photoStepper.value
                    loadImage();
                protected function enterFrameHandler(event:Event):void
                    if (source.alpha <1){
                        source.alpha+= .1;
                    } else{
                        removeEventListener(Event.ENTER_FRAME,enterFrameHandler);
                public function getPath():String
                    return("images/image"+loader.Index+".jpeg")
                public function loadImage():void
                    loader.load(new URLRequest[getPath()]);

    public function initHandler(event:Event):void
    only the 'E' should be uppercase

  • Having trouble with multiple wireless users on WRT54G router

    Basically, there are 3 of us wirelessly sharing the internet via a linksys WRT54G router. I have our router password-protected, to avoid randoms stealing out broadband. I am a Mac user (3 year old computer), the other 2 are on PC laptops.
    At the moment, I have an excellent internet connection, and it's working just fine. However, if my room mate connects with their laptop (a fairly new model), my internet connection stops working. I still have a signal, but it just really slows down/often stops working entirely. It's  as if their wireless connection takes priority and ignores mine (essentially nullifying the router's purpose).
    Has anyone come across a problem like this before? Your assistance would be super helpful and appreciated.

    Hi, perhaps you may try the following steps to improve the performance of your router:
    • Upgrade the router’s firmware
    • Reset the router after the firmware upgrade
    • Optimize the router’s wireless settings
    • Use a wifi analyzer like http://www.metageek.net/products/inssider/ to set a non overlapping channel to the router
    • Relocate the router on a more central location for better wireless coverage
    • Avoid placing the router on a glass or metallic surface

  • Text with multiple lines limit each line to 10 digits

    Im trying to create a Numeric Field with multiple lines and limit the character per line to 10
    ideally I want the users to be able to paste in a 10 digit number similar to this:
    0001234567
    0001234568
    0001234569
    I can set my pattern to num{zzzzzzzzzz} but not sure how to allow multiple lines
    Im using Adobe LC ES2 Verison 9.0
    Thanks!

    better option is to use INCLUDE statement in SCRIPTS. its a script control command and you no need to use READ_TEXT and to loop it and send each line to script.
    if you use the above INCLUDE control command, SAP will take care of printing total text of that Object.
    here is the syntax :
    <b>/: INCLUDE name [OBJECT o] [ID i] [LANGUAGE l] [PARAGRAPH p] [NEW-PARAGRAPH np]</b>
    here /: indicates its an Control command.
    you have to use NAME, ID, LANGUAGE adn OBJECT here.
    if you give these details in the Text editor of script layout,automatically data will be printed on the screen.
    ex:
    /: INCLUDE &EKKO-EBELN& OBJECT EKKO ID X LANGUAGE E
    Hope you got the Idea.
    <b>here is brief help about INCLUDE:</b>
    Use INCLUDE to include the contents of another text into your text. The text to be included exists separately from yours and is only copied at the time of the output formatting. With INCLUDE, since the text is only read and inserted during the output formatting, the most current version of the required text is always available.
    and IF you are very specific about using READ_TEXT to display the contents,
    then you have to LOOP that table and call the WRITE_FORM to print the line on the layout.
    LOOP AT IT_TDLINES.
      CALL FUNCTION 'WRITE_FORM'
    ENDLOOP.
    Regards
    Srikanth
    Message was edited by: Srikanth Kidambi

  • Text Field with multiple lines

    I am trying to create a text field in the selection screen where it can insert a text with multiple lines for instance those text fields which you can see online where you can key in text lines after lines.
    How do you do that in ABAP?

    Hi
    See any Std program code for CREATING long Text lines
    See any application document HEADER or ITEM text and copy that code
    first declare a field with some table field
    like
    PARAMETERS: p_text like Tline-tdname.
    then keep a button (for Long text) and in the program write a code such that when you press on that line it will take you to text ediotr
    using the CREATE_TEXT fun module
    copy it from a std program text..
    <b>Reward points for useful Answers</b>
    Regards
    Anji

  • Printing Text with multiple Lines

    Hello,
    i want to print a list and in that is text with multiple lines.
    In the PrintPreview and in the Printout i get only one line.
    How is the best way to do this?
    Thank you,
    Markus
    Private Function Print_Remarks_Control_Get(ByVal pstrText As String) As TextBox
    Dim TextBox_Out As New TextBox
    With TextBox_Out
    .Text = pstrText
    .HorizontalAlignment = Xaml.HorizontalAlignment.Left
    .VerticalAlignment = Xaml.VerticalAlignment.Top
    .FontSize = 16
    .Margin = New Thickness(15)
    .AcceptsReturn = True
    .MinWidth = 800
    .MinHeight = 600
    End With
    Return TextBox_Out
    End Function
    Sub PrintPageList_Prepare()
    Dim i As Integer
    Dim objVM As clsTextVM
    Dim lstText_List As ObservableCollection(Of clsText)
    Dim ctrPrint_StackPanel As StackPanel
    Dim ctrPrint_Title As TextBox
    Dim ctrPrint_Description As TextBox
    Dim ctrPrint_Remarks As TextBox
    Dim objText As clsText
    mPrintPageList.Clear()
    objVM = DirectCast(Me.DataContext, clsTextVM)
    lstText_List = objVM.CustomClass_List
    ctrPrint_StackPanel = Print_StackPanel_Get()
    For i = 0 To lstText_List.Count - 1
    objText = lstText_List.Item(i)
    If objText.Name.Length > 0 Then
    ctrPrint_Title = Print_Title_Control_Get(objText.Name)
    ctrPrint_StackPanel.Children.Add(ctrPrint_Title)
    End If
    If objText.Description.Length > 0 Then
    ctrPrint_Description = Print_Description_Control_Get(objText.Description)
    ctrPrint_StackPanel.Children.Add(ctrPrint_Description)
    End If
    If objText.Remarks.Length > 0 Then
    ctrPrint_Remarks = Print_Description_Control_Get(objText.Remarks)
    ctrPrint_StackPanel.Children.Add(ctrPrint_Remarks)
    End If
    Next
    mPrintPageList.Add(ctrPrint_StackPanel)
    End Sub
    Private Sub OnGetPreviewPage(sender As Object, e As GetPreviewPageEventArgs)
    ' Das ist die MessageBox
    ' Windows.UI.Popups.MessageDialog()
    PrintPageList_Prepare()
    mPrintDok.SetPreviewPage(e.PageNumber, Me.mPrintPageList(e.PageNumber - 1))
    End Sub

    Yes, not only RichEditBox but also RichTextBlock can also do this. Besides TextBox also have TextWrapping functionality.
    -James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Sharepoint 2010 - Multiple line of text column with Plain text type

    Hi All,
    I have list where multiple lines of text with plain type column is used. When I start entering information in multiline text box in new form, I faced following problem,
    I typed enough information so that scroll bar is visible. When I stopped typing information, scrollbar automatically scrolled up and last few lines are not visible. But when I started typing again, my cursor is automatically placed at the end text and now I
    am able to see last lines.
    This issue occurs in IE8 version and not in other versions. Can anybody help me to resolve this issue or tell me this is bug in IE8?

    Try press ctr F5 and refresh the page to load it properly, also check in browser compatibility mode
    Mark ANSWER if this reply resolves your query, If helpful then VOTE HELPFUL
    INSQLSERVER.COM
    Mohammad Nizamuddin

  • My Macbook with 10.6.8 is having trouble with certain applications- Word will not open, and text edit or pdf will not print.

    My Macbook (13 inch 2008) running OS 10.6.8 is having trouble with some applications.  Word will not even open.  I cannot print from text edit or Preview or Adobe.  Excel sometimes opens but very slow.  What could be wrong?  I have repaired permissions, used an antivirus program, deleted some old MS fonts, and still no change.  I have 1 G RAM and there seems to be plenty available and I have 50 G of hard drive space empty.

    Well, first 1gb of Ram is not plenty. It's the absolute bare minimum just to run OS X 10.6.8. The MS Office applications are ram hogs also. I would recommend three things.
    1. Get more ram.
    2. Reinstall and update your MS Office applications.
    3. Reinstall Snow Leopard.
    If you're not familiar with Activity Monitor you might have a look at this link and you'll be able to judge your ram situation a little better.
    http://support.apple.com/kb/PH5149

Maybe you are looking for

  • Cdrecord and others - error when starting burning

    HI, I need some help with this. I googled three hours for solution. I need to burn win iso image to DVD-R medium. Here is the error: $ cdrecord -v -sao dev=/dev/sr0 cswindows7professionalx86.iso TOC Type: 1 = CD-ROM scsidev: '/dev/sr0' devname: '/dev

  • Non SSL website on port 443

    Hi, I have a non-SSL website running on port 443. When I access this website using Chrome or IE it works just fine, but Firefox can't seem to accept what I have done. All browsers on the same machine and using the same web proxy. I access the website

  • Working on Well Creation Program using BAPI

    Hi, My requirement is to be create well using standard BAPI 'BAPI_WELLID_CREATE'. T-code is O3U_Wl1. When I am calling this bapi into my program it's not creating entries in O3U_Wl3. Can anyone please help me out? Thank-You, Sony

  • Permissions on server

    Hi all, I have a small network with an OSX 10.3 Server sharing a RAID drive amongst ten or so 10.4 Macs. Each of the Macs belongs to a group on the server, and everything works beautifully. I recently upgraded one of the Macs (mine) to 10.5. When I l

  • How to find my recovery key

    Im trying to sync my desktop with a new laptop. Have followed instructions and entered 12 digits where requested having signed up for an account in advance. After adding the 12 digits neither of them shows any sign of syncing. the next page asks for