problem in the labels and text

Hello

This is my first program.
I created the new GUI with a component.
I added a few Jtextbox and Jlabel component and I want that that each label will have textbox and then going to be new line.
the problem that I saw all the labels and text in one place
This is the main code
import javax.swing.*;

import javax.swing.event.ListSelectionEvent;
import javax.swing.event.ListSelectionListener;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.*;

//import GUIclass.ButtonHandler;

import java.awt.event.*;
import java.awt.*;
import java.io.FileOutputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.Hashtable;
import java.util.LinkedHashMap;
import java.util.Properties;




public class FormattedTextFieldDemo extends JFrame
{
     
     public FormattedTextFieldDemo(){
          
//Set Title          
     super("Information Composer - Configuration");

     JInternalFrame iframeGen = new JInternalFrame("test1", true,true,true,true);                                   
     JPanel panelGen = new JPanel();
     rameGen.add(panelGen);
                 iframeGen.setSize(400,300);
         iframeGen.setLocation(50,350);
         iframeGen.setVisible(true);
    
//Read File          
          file = new File();
          file.ReadFile();
          ArrayList<InputData> arr = file.GetArrInputData();
          InputData tempInp;
//Add labels + text to general information           
          for ( int i = 0 ; i < arr.size() ; i++ )
          {
               tempInp = arr.get(i);          
               panelGen.add(tempInp.GetJLabel());
               panelGen.add(tempInp.GetJTextField());     

          }

//Set Jframe data    
          setSize(1000, 1000);
          setLocation(0,0);     
          setVisible(true);
         JDesktopPane desk = new JDesktopPane();
         desk.add(iframeSystem);
         desk.add(iframeGen);
         desk.add(iframeHana);
         desk.add(iframeCommit);
         add(desk);
          }


        
     public static void main(String[] args) 
     {
          FormattedTextFieldDemo test = new FormattedTextFieldDemo();
          test.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

     }
     
       
    }
Edited by: sabre150 may 18, 2011 04:37

Barcode labels added to make the code more readable.

859774 wrote:
just to be sure that the reason for which the label and the text box in the jpane not in the correct order (which means that some in the same line) connect available to you?

You don't have to believe me, and you don't have to read the tutorial. You can keep blunders on in the hope that someone someday will alter your code so you want. Sure it might take awhile to find a fool to do it for you; probably more time than necessary to read the tutorial but Hey - your call.

Good bye

Tags: Java

Similar Questions

  • Problem with the alignment of text and numbers

    I have problem to align the number and text... It separates the number of the actual sentence... How can I fix?

    Untitled.png

    http://forums.Adobe.com/message/4653327#4653327

  • Since the upgrade to the latest version of firefox, I have only the icons in my firefox bookmarks; checking 'icons and text' in my 'Favorites to customize' does that not affect google toolbar Firefox, how do I get the icons and text in Firefox bookmarks?

    I've upgraded to firefox 8.0.1 and now my favorites have only the icons and no text. By clicking on "icons and text" in PREFERENCES, affects only the Google toolbar and not Firefox bookmarks.
    How to restore the icons and text to my "bookmarks toolbar"?

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • HP 15 laptop: problem with the touchpad and the key "stuck."

    Hello!
     
    Last weekend, I have an irritating problem with my HP 15 laptop. Bought two years ago and upgrades to Windows 10 a year ago.
     
    First of all, my touchpad started to not work properly. It "freezes" and I can't use it until I click the ESC key, but it doesn't last and "freezes" again a few seconds later. Then, everytime I open a window where there is a text box (Start menu, edge browser, Control Panel, etc.), the number 5 is entered automatically and permanently, as if the button 5 has been blocked. I did a quick check and button 5 do not seem physically stuck.
     
    Yesterday, I restored the system to the factory settings, so I'm back to 8.1 for Windows and then upgraded to Windows 10. Everything seems to work fine, but this morning, the problem was back. Is there something I can do? What is the problem caused by Windows 10 or the computer? Should I restore it to Windows 8.1? Everything worked great til last weekend, I don't know what that was.
     
    Thank you in advance for your help!

    Welcome to the HP support community @gouch3.

    I understand that you have a problem with the keyboard and the touchpad on your laptop from HP 15.

    Have you tried to use a keyboard external and mouse at all?

    Have you tried to go to Safe Mode to see if the problems persist in there?

    Have you tried to perform a material or forced reset Reset?

    Did you do a test of material?

    Have you updated your drivers?

    gouch3 wrote:

    ... Is there something I can do? What is the problem caused by Windows 10 or the computer? Should I restore it to Windows 8.1? Everything worked great til last weekend, I don't know what that was.

    It could be a driver problem to be able to look at that for you, I need your model number. I wish I could give you an answer or not, but at this point without the troubleshooting results and the model number, it is difficult for me to say.

    I can say that if everything works in point 8.1 of Windows without problem, the driver TROUBLESHOOTING is a great place to start. Please try to follow these steps for the keyboard and the touchpad of troubleshooting:

    • Beginning
    • Search for Device Manager
    • Search results, open Device Manager.
    • Click on display
    • Show hidden devices.
    • Click the arrow next to keyboards.
    • Right click on the name of the keyboard device.
    • Select uninstall.
    • Continue deleting the names of devices in the category keyboards until the feature of all the names have been uninstalled.
    • Restart the laptop twice.

    Touchpad:

    • Type of research, "Device Manager."
    • Click on Device Manager,
    • Expand mice and other pointing devices.
    • Right click on the TouchPad,
    • Click on uninstall.
    • Restart the computer laptop twice,
    • Reinstall the TouchPad card.

    I found a document of troubleshooting for you to try also called Portable keyboard troubleshooting. Please be sure to follow the steps described in this document.

    The best document I have for TouchPad problems is the use and troubleshooting of the TouchPad and ClickPad document. 

    Here is a link to the HP Support Assistant, if you need it. Just download and run the application and it will help with the software and drivers that need to put up-to-date.

    This is a great question other clients may also be questioned. When we came to a resolution, please share what has worked for you with others by marking this post as an acceptable Solution. If you want to show appreciation for my efforts today, please take a second to click the Thumbs Up button below.

    If you need assistance, I would be more than happy to continue to help you. Please re-post with the results of the resolution of the problems. Could you please also provide your model number (How can I find my model number or product number?)

    Thank you!

  • Problem with the report and the system of axis 2d

    Hi, I'm trying to write a script with tiara, who wrote a 2d axis system in the report but I'm having a lot of problems with it.

    What I'm trying to do, is make 3 or more system axis 2d in the report, each displaying a part of the data of 2 channels (x = ch0, ch1 = y).

    With only 1 graphic I get what I want, but when I try to add the 2nd or the 3rd, they show without my defined x-scale and with the offset x different from the first chart.

    I tried everything, but I could not remedy

    I added as attachments the .csv file that I use to ch0 and ch1 and 2 screen shoots "what I get" (about the problem with the script) and "what I hope to get" (done manually, is what I'm trying to get the report)

    Any help will be appreciated, thanks in advance

    Ierman

    I'll post my code here:

    Dim Xscale, Yscale
    XScale = Array (0,25,0,5,49)
    Yscale = Array(-0.2,0.2,-0.2,10,4)
     
    Call PicDelete()
    Call GraphObjNew ("2D-Axis", "2DAxis1")
    Call GRAPHObjOpen ("2DAxis1")
    D2AxisTop = 1

    D2AxisBottom = 70
    D2AxisLeft = 1
    D2AxisRight = 1
    Call GRAPHObjOpen ("2DYAxis1_1")
    D2AxisyScaleType = "manual".
    D2AXISYBEGIN = Yscale (0)
    D2AXISYEND = Yscale (1)
    D2AXISYORIGIN = Yscale (2)
    D2AXISYTICK = Yscale (3)
    D2AXISYMINITICK = Yscale (4)
    Call GRAPHObjClose ("2DYAxis1_1")
    Call GRAPHObjOpen ("2DXAxis1_1")
    D2AxisxScaleType = "manual".
    D2AXISXBEGIN = Xscale (0)
    D2AXISXEND = Xscale (1)
    D2AXISXORIGIN = Xscale (2)
    D2AXISXTICK = Xscale (3)
    D2AXISXMINITICK = Xscale (4)
    D2AxisXTxt = ""

    D2AxisXColor = 'black '.

    D2AxisXTickAuto = 1
    D2MTickLineWidth (1) = 0.1
    D2MTickLineType (1) = "solid".
    D2AxisXTickSize = 60
    D2AxisXTxtAutoCo = 0
    D2MTickColor = "red".
    Call GRAPHObjClose ("2DXAxis1_1")
    Call GraphObjNew("2D-Curve","New_Curve")

    Call GraphObjOpen ("New_Curve")

    D2CCHNX = "[1] / [1]" "

    D2CCHNY = "[1] / [2]" "

    D2CurveColor = "red".
    Call GraphObjClose ("New_Curve")
    Call GRAPHObjClose ("2DAxis1")

    Dim Xscale1, Yscale1
    Xscale1 = Array (25,50,0,5,49)
    Yscale1 = Array(-0.2,0.2,-0.2,10,4)
    Call GraphObjNew ("2D-Axis", "grafic")
    Call GRAPHObjOpen ("grafic")
    D2AxisTop = 40

    D2AxisBottom = 37
    D2AxisLeft = 1
    D2AxisRight = 1
    Call GRAPHObjOpen ("2DYAxis1_2")
    D2AxisyScaleType = "manual".
    D2AXISYBEGIN = Yscale1 (0)
    D2AXISYEND = Yscale1 (1)
    D2AXISYORIGIN = Yscale1 (2)
    D2AXISYTICK = Yscale1 (3)
    D2AXISYMINITICK = Yscale1 (4)
    D2AxisYTxt = "" ' testo asse label y
    Call GRAPHObjClose ("2DYAxis1_2")
    Call GRAPHObjOpen ("2DXAxis1_2")
    D2AxisxScaleType = "manual".
    D2AXISXBEGIN = Xscale1 (0)
    D2AXISXEND = Xscale1 (1)
    D2AXISXORIGIN = Xscale1 (2)
    D2AXISXTICK = Xscale1 (3)
    D2AXISXMINITICK = Xscale1 (4)
    D2AxisXTxt = «»

    D2AxisXColor = 'black '.

    D2AxisXTickAuto = 1
    D2MTickLineWidth (1) = 0.1
    D2MTickLineType (1) = "solid".
    D2AxisXTickSize = 60
    D2AxisXTxtAutoCo = 0
    D2MTickColor = "red".
    Call GRAPHObjClose ("2DXAxis1_2")
    Call GraphObjNew("2D-Curve","New_Curve1")

    Call GraphObjOpen ("New_Curve1")

    D2CCHNX = "[1] / [1]" "

    D2CCHNY = "[1] / [2]" "

    D2CurveColor = "red".
    Call GraphObjClose ("New_Curve1")
    Call GRAPHObjClose ("grafic")

    Hi lerman,.

    Here is an edited version of your code that works on my computer.  A problem that I know that I fixed it was that your presentation of the STATE was in the name-oriented mode but you use the variables based on the number to assign it X and Y channels.  The execution of these commands in a loop FOR makes it much easier to debug the code and to avoid any annoyance at first.

    Brad Turpin
    Tiara Product Support Engineer

    National Instruments

  • How can I enlarge the icons and text on my ipad Air2 home screen?

    I have an iPad Air2 and I want to enlarge the icons and text on the home screen.  Is this possible?

    iOS 9.2

    You can use the zoom. Settings > general > accessibility > zoom. -AJ

  • Problems with the date and time - have to reset the date & time on reboot

    original title: problems with the date and time

    Whenever I turn on my computer (Windows XP 2002) I click on F2.  Then I re - set the date and time it occurred in January 2006 1 h every time I have turn off the computer.  Can someone tell me what I need to do?

    You need to replace the battery in time clock (RTC) real of your computer.  It can also be called the CMOS or BIOS battery.

    Many computers, this battery is an inexpensive CR2032 button available in almost every pharmacy corner.  There are, however, some computers (especially laptops) that require a different (and probably more expensive) battery.

    Whatever the expense, almost all of these batteries are easy to replace.

    To get help, post back with the brand and model of your computer.

  • I've had dramas with my photos because I got my new iphone 4s in saying that there is a problem with the properties and I can't change the format of images

    Hello

    I've had dramas with my photos because I got my new iphone 4s in saying that there is a problem with the properties and I can't change the format of images (ie the rotating EGTC)

    Now, I see the image preview and it disappears to the flower, so I did not see one of my photos

    Some would like TO help on this im so not good with this kind of thing.

    Appreciate it in advance

    Let

    Hello

    • When you change the format of images of?
    • What is Windows Explorer or Itunes?

    Try the TV activation

    Enabled and disable the Option 'show window previews (thumbnails) '.

    a. right click on the taskbar.

    b. Select Properties.

    c. check show window previews (thumbnails) "Option. .

  • Problem with the areo and transparency in Windows 7 after installation of Nvidia Geforce go 6200

    Am having problem with the areo and transparency in Windows 7 after installation of Nvidia Geforce go 6200

    * original title - I'm having a problem *.

    You have the latest drivers?
    http://www.nvidia.com/page/support.html

    Aero - Windows 7 - How to troubleshoot problems with Aero

    (1) first of all, click on the Start button and type in Aero. Now, click on find and fix problems with transparency and other Visual effects of link.

    (2) a new Wizard dialog box opens. Make sure that you click Advanced to solve all problems automatically.

    (3) either the problem will be solved or not. If this isn't the case, you will get a list of items that are potential problems.

    (4) If you want to see more details about the problem, you can click View detailed information. This will give you a list of potential problems that have been verified and those that pose problems.

    If it does not---> click Start---> right click computer---> click Properties

    Click the link for 'Windows performance index' and then click 'rerun the assessment"to refresh your WEI score and try again.

    Note: If you have Windows 7 Starter, or if your system does not meet the requirements for Aero you will not be able to use Aero.

  • [JS] How to show the label and the name of the object?

    Hello.

    This image is FrameLabel SDK sample.

    I want to show the label and the name that I set as image.

    For example,.

    App.Selection [0] .label = "label";     App.Selection [0] = [TextFrame object]

    App.Selection [0]. Name = "name";

    What is show and code to set property?

    You can not via JS, unless first do you a plugin to c ++ as that in the SDK and make it scriptable.

  • I can't add youtube video on my site (Muse response: there is a problem with the program and windows stops)

    I can't add youtube video on my site (Muse response: there is a problem with the program and windows stops)

    Use the command search at the top of this page or follow this link: YouTube embedding continues to crash the app.

  • Photoshop elements 13 said that there was a problem with the download and recommend exit us and restart

    We bought a new laptop and 13 items today. We spent the day trying to get it set up. We tried to download the 13 items at least 6 times. Whenever it took about 45 minutes to download, but when we open the file and click on set up it says that there was a problem with the download and it recommends that stop, restart and download it again? How we work what goes wrong? We had to remove the files and start every time. I don't have another day to try to get this sort. Should not it is just a matter of downloading and then, should not come with a message to install and we just press Yes and it works.

    You can also download the trial version of the software directly (No Download Manager) through the page linked below and then use your current serial number to activate it.  You should get two files, an executable file and a compressed file.  Run the executable file and it will install the rest.

    Don't forget to follow the steps described in the Note: very important Instructions in the section on the pages of this site download and have cookies turned on in your browser, otherwise the download will not work correctly.

    Photoshop/Premiere Elements 13: http://prodesigntools.com/photoshop-elements-13-direct-download-links-premiere.html

  • Help, I have a problem with the PS and CC - I get and error measure in PS - "this program cannot start because ONCoreFoundation8.dll - is missing... and it crashes, and now creative cloud will not be open to all."  I spent more than 2 hours to speak to so

    Help, I have a problem with the PS and CC - I get and error measure in PS - "this program cannot start because ONCoreFoundation8.dll - is missing... and it crashes, and now creative cloud will not be open to all."  I spent more than 2 hours to speak to someone in tech support that I did not understand, and I don't know what to do next. The tech gal was run, but once she hung up he returned to broken.  I have an idea, but that's just a guess - trouble started about the time I tried to open On1 of ps there has been a perfect icon effects 9 (for some reason, they decided to add the icon when I got it - I have 8) I clicked it and it loaded the update and then asked me if I wanted to try or buy - that's when I realized that I should have clicked on 8 and tried of back , but is either too late - I think, maybe this dll. 8 or 9 in with perfect On1 effects - and it has changed my settings in PS - and is the reason why it is not compatible - ideas? I have a pc with window7-Carol

    Try to run Photoshop without loading third-party plug-in. hold SHIFT keys when you start Photoshop.  The missing module is not Adobe software.

  • I have installed Adobe Audition on my pc but I have a problem with the time and the effects of pitch appear unavailable

    I have installed Adobe Audition on my 64-bit pc but I have a problem with the time and the effects of pitch appear unavailable because... I can do?, installed on another PC laptop 64 bist and does not

    My guess is that you are in multitrack view and not editview

    These fx are destructive and only take effect when you change a single audio file in editview

  • Hello good I would like to cancel the annual plan of adobe audition, because I had problems with the software and the Bank, if I can help with this please.

    Hello good I would like to cancel the annual plan of adobe audition,

    As I have had problems with the software and the Bank, if I can help with that please.

    Please contact customer support for cancellation & refund of the next purchase. Contact the customer service

    Creative single-app cloud membership for Adobe Audition (one year) Subscription Office March 11, 2015

    In the case of any questions, please let us know, I can certainly go for you.

    Concerning

    Baudier

Maybe you are looking for

  • disk partition utility grey buttons

    The new disk in el capitan utility is driving me crazy. To begin with why I can't partition during erasure.  Where is this option. I was able to partition a USB once but I can just manage to do it again. In the partition screen the + and - buttons ar

  • Mover back controls simultáneamente

    Hola, Con UN tengo control tab back pestanas, el caso're quiero poner a digital in cada pestana control para UN indicator than just control is muestra in the segunda pestana, of manera if yo cambio el valor del control tanto in the pestana 1 como in

  • default port comms

    I'm under the latest version of Lookout in a very simple configuration to control three Modbus nodes on a USB / 485 port converter. Everything works perfectly and has been installed on both machines. There was a problem with the first machine in the

  • error in file c:\windows\system32\optional features.exe 1073741502 system

    help I can't on the internet

  • Why do I get errors in script on facebook?

    I get the error script on facebook.  I ran the SmartPCFixer and it always comes back constantly every time as I try to type on facebook.