How can I change the layout on this JDialog?

Hi , I have the following Dialog with some content. As of now, the line after the separator is displayed in two lines. I was looking for a way to show that in one line and change the column widths a bit so that the rest of the content can each be shown on one line as well, according to the look and feel of a table.
Here's the code:Please download [TableLayout.jar|http://java.sun.com/products/jfc/tsc/articles/tablelayout/apps/TableLayout.jar] in order to compile.
Thanks!
import layout.TableLayout;
import java.awt.BorderLayout;
import java.awt.Component;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JSeparator;
import javax.swing.JTabbedPane;
import javax.swing.JTextPane;
import javax.swing.text.StyledEditorKit;
public class MyDialogTest implements layout.TableLayoutConstants {
     JTabbedPane pane;
     JDialog myDialog;
     JTextPane infoPanel;
    public MyDialogTest() {
         myDialog = new JDialog();
         myDialog.setTitle("MyDialogTest");
         pane = new JTabbedPane();
         JPanel panel = new JPanel(new BorderLayout());
         panel.add(makeTab(), BorderLayout.CENTER);
         pane.addTab("About", panel);
         myDialog.getContentPane().add(pane);
         myDialog.setSize(500, 620);
         myDialog.setResizable(false);
         myDialog.setVisible(true);
    private Component makeTab() {
         JPanel aboutPanel = new JPanel();
        double [][] size = {{PREFERRED, FILL},{PREFERRED, PREFERRED, PREFERRED, PREFERRED, PREFERRED, PREFERRED, PREFERRED, PREFERRED, PREFERRED, PREFERRED, FILL}};
        TableLayout layout = new TableLayout(size);
        aboutPanel.setLayout(layout);
        JLabel headerLabel = new JLabel("About This Application");
        aboutPanel.add(headerLabel, "0, 0, 1, 0");
        aboutPanel.add(new JLabel("Version 4.1"), "0, 1, 1, 1");
        aboutPanel.add(new JLabel(" "), "0, 2, 1, 2");
        aboutPanel.add(new JLabel("Customer Service: 1-800-888-8888"), "0, 3, 1, 3");
        JLabel yahooUrl = new JLabel("www.yahoo.com");
        aboutPanel.add(yahooUrl, "0, 4");
        aboutPanel.add(new JLabel(" "), "0, 5");
        aboutPanel.add(new JSeparator(), "0, 6, 1, 6");
        aboutPanel.add(new JLabel(" "), "0, 7");
        infoPanel = new JTextPane();
        infoPanel.setEditable(false);
        infoPanel.setEditorKit(new StyledEditorKit());
        infoPanel.setContentType("text/html");
        makeInfoPanel();
        aboutPanel.add(infoPanel, "0, 8, 1, 8");
        JButton copyToClipboardButton = new JButton("Button1");
        JButton moreInformationButton = new JButton("Button2");
        JPanel buttonPanel = new JPanel();
        buttonPanel.add(copyToClipboardButton);
        buttonPanel.add(moreInformationButton);
        aboutPanel.add(buttonPanel, "0, 9");
        return aboutPanel;
    private void makeInfoPanel() {
          StringBuffer infoPaneContent = new StringBuffer("<html><head></head><body><table>");
          infoPaneContent.append("<tr><td>Version 4.1 (build  111708-063624"+ "</td></tr>");
          infoPaneContent.append("<tr><td>Customer IP Address:</td>&nbsp <td>10.53.62.11</td></tr>");
          infoPaneContent.append("<tr><td>JMS Server:</td>&nbsp <td>myserver</td></tr>");
          infoPaneContent.append("<tr><td>Quote Server:</td>&nbsp <td>qs2w62m3/qs106w60m3</td></tr>");
          infoPaneContent.append("<tr><td>Login ID:</td>&nbsp <td>programmer girl</td></tr>");
          infoPaneContent.append("<tr><td>Java Version:</td> &nbsp<td>"+ System.getProperty("java.version") + "</td></tr>");
          infoPaneContent.append("<tr><td>Operating System:</td> &nbsp<td>"+ System.getProperty("os.name") + " "+ System.getProperty("os.version") + " ("+ ")" + "</td></tr>");
         infoPaneContent.append("<tr><td>Browser Version:</td>&nbsp <td>"+ "Mozilla/4.0(compatible: MSIE 6.0; Windows NT 5.1; SV!; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648" + "</td></tr>");
          Runtime rt = Runtime.getRuntime();
          infoPaneContent.append("<tr><td>Free Memory (KB):</td>&nbsp <td>("+ rt.freeMemory() / 1000 + " / " + rt.totalMemory() / 1000+ ")</td></tr>");
          infoPaneContent.append("<tr><td>Symbols In Use:</td>&nbsp<td>symbol</td></tr>");
          infoPaneContent.append("<tr><td>JMS :</td>&nbsp<td>connected</td></tr>");
          infoPaneContent.append("<tr><td>Market Data :</td>&nbsp<td>connected</td></tr>");
          infoPaneContent.append("<tr></tr>");
          infoPaneContent.append("<tr></tr>");
          infoPaneContent.append("</table></body></html>");
          infoPanel.setText(infoPaneContent.toString());
     public static void main(String[] args) {
          MyDialogTest test = new MyDialogTest();
}

Just sign out and sign in with your UK Apple ID
Edit: If you press your name on this page (top left), you get "Actions" on the right side. Here you can change timezone, location etc.

Similar Messages

  • How Can I change the Authentication for this Dynpage

    Hello ,
    I have created a rss feed in special Dnypage.   When I try to connect with rss reader  to dynpage it occurs an error 500.  The problem is that no logon screen appears and the portal would start the Dynpage with the User Guest.
    How Can I change the Authentication for this Dynpage ? I need a LogonScreen
    RSS URL:
    /irj/servlet/prt/portal/prtmode/rss/prtroot/com.geberit.ep.uwlquick.uwlquickstarter?mode=rss

    Hi ,
    sry the entry in xml does not help. No Logon Prompt
    <?xml version="1.0" encoding="UTF-8"?>
    <application>
      <application-config>
        <property name="SecurityArea" value="NetWeaver.Portal"/>
        <property name="Vendor" value="xx.com"/>
        <property name="PrivateSharingReference" value="com.sap.portal.htmlb,com.sap.portal.pcd.glservice,com.sap.portal.ivs.iviewservice,usermanagement,,com.sap.netweaver.bc.uwl"/>
      </application-config>
      <components>
        <component name="uwlquickstarter">
          <component-config>
              <property name="SafetyLevel" value="no_safety"/>
            <property name="ClassName" value="com.xx.portal.uwl.uwlquickstarter"/>   
          </component-config>
              <component-profile>
                   <property name="AuthScheme" value="default"/>
              </component-profile>
        </component>
      </components>
      <services/>
    </application>

  • How can I change the color in this "pieces"

    Hello guys, I'm new in the forum and I'm searching for help.
    I'm using a free template that I downloaded from
    the internet but I'm having a small problem.
    When I put the logo that I want use in the template, the color is not the original one,
    after some minutes trying to discover how I could change it to the original version of the logo, I found an option on "fill" with a color that I could change..
    the problem is that when I change the color, all the logo changes in the same time, so I created 2 logos.. one of then only with the dark color and the other with the red color
    so with this method I could change both colors on this "fill" option and all would be okai.
    the problem is that both of the logos are changing in the same time.
    I need to change the X to RED and the Moto to Black
    Another problem that I have is : the little pieces of the logo that come all togheter, they are all black.. and i need to change it to the right color.
    cause the text are in one color and the pieces are all black.

    I did it, but i saw that Fill effect is a little "Shadow" behing the text... just for a small white line... I'm almost done with this intro, now I'm trying to find out how can I change the color from the X and MOTO
    cause when I change the color, both changes, and this can't happen.
    I need the X red and the Moto dark...
    I made 2 compositions ... one with just the X  X red.. and another with just Moto in dark color... but I don't know how to put this 2 compositions in 1 composition.

  • How can i change the name of this file?

    In finder, the file under "desktop".

    Click on the file to highlite it, and hit the return key. Edit text/file name.
    You can not change the Places name: Desktop
    Message was edited by: leroydouglas

  • How can i change the Layout of the standard Discussion iVIew

    Hello all,
                 Most of my questions still remain unanswered.But this time i hope i will get some satisfactory reply. I want to create a Discussion iView(not Discussion group or Admin Discussion Group iViews) . However i am not getting the layout used here.I want to remove buttons like "Add To Favourites" Subscribe TO Discussion" and also ,once you click on any topic ,on the second screen commands like "Send To","Subscribe" etc .I want this to look simple as per requirement.How is that possible? Where exactly can i find them ? If there is any xml file ,where to find the XML file ?I do not know how to use NWDS ,as i work in KM and Collaboration area .SO if there is anyone who can guide me from configuraion point of view.I can also open the XML file and do the changes but how to execute it I do not know.Thanks in advance for any valuable input.
    Edited by: Arijit Bhattacharya on Feb 25, 2008 2:57 PM
    Edited by: Arijit Bhattacharya on Feb 25, 2008 2:59 PM

    Hi Arijit,
    try these links
    [http://help.sap.com/erp2005_ehp_03/helpdata/EN/01/ed0f412d72f323e10000000a155106/frameset.htm]
    [https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/504e31fc-f46f-2910-98b4-dd94478c22f8]
    hope this helps you
    Regards,
    vv.

  • How can I change the colors of this image?

    I want to change the color scheme of this image, not just re-color it one color.  I have the original file, this is just the shutterstock preview image.
    Any tips would be much appreciated! Thanks

    colored image like this one, the Hue/Saturation function can be used to alter specific ranges of colors.  For example, altering the Hue and Saturation of Cyans and Yellows...
    -Noel

  • How can i change the perspective of this shape i made (cs5)?

    i made a shape and i want to change the perspective so it can look like mat on the ground. is it possible?    eg)  http://img834.imageshack.us/img834/5120/thitothis.jpg
    i can do with rectangles easily, but after ive added the decoration to the mat from a birds eye view, idk how to do it.
    thanks

    Convert it to a symbol and use perspective grid. There are lots of tutorials on the feature, you could try http://fridays.mordy.com or http://blogs.adobe.com/infiniteresolution/2010/05/drawing_in_perspective_using_a.html

  • How can I change the country on this account?

    I made an discussion account and I just realised it's in United States and from uk. Is there anyway I can change this or delete it and create a new one? My Apple ID is also uk

    Just sign out and sign in with your UK Apple ID
    Edit: If you press your name on this page (top left), you get "Actions" on the right side. Here you can change timezone, location etc.

  • How can I change the default application for a content type?

    Running a version of Linux, the default application for PDF files is "Use Document Viewer (default)", which appears to be /usr/bin/evince. I'd much prefer to use /usr/bin/okular; how can I change the default. This question is NOT about how to change the function that is automatically applied when I access a link, in this case "Preview in Firefox", but rather to the default application that I can select when I download a file being viewed in Firefox's previewer.

    This is real progress, a solution to the problem as posted. The command:
    xdg-mime default okularApplication_pdf.desktop application/pdf
    makes okular the default.
    However when I added okular to the choices for applications in:
    * Edit>Preferences>Applications>PDF
    the popup box that appears when I click Download on the preview page changed. The pulldown menu that appears next to "Open with" used to have 3 entries:
    # Document Viewer (default)
    # Acroread
    # Other
    Now it has only 2:
    # Okular (Default)
    # Other
    I'd like it to read
    # Okular (Default)
    # Acroread
    # Other
    How can I control the entries in this pulldown list?
    Also, how can I make the default choice in the popup box be
    * Open With <whatever> , rather than
    * Save File ?

  • How can I change the parameters in form

    Hi there,
    I´m creating a WD application with add and change data.
    The change form it´s ok and works fine, but I want to use the same form to add data too...
    But the change from has some element "read only", how can I change the parameter in this form and clean the other elements?
    Thanx a lot

    hi minoru.....
    consider you are having an input field....
    create an attribute of type string in the context.
    bind it to the read only property of the input field.
    now pass the value x to the input field, to make it read only  or pass '' to make it read write.
      DATA lo_el_context TYPE REF TO if_wd_context_element.
      DATA ls_context TYPE wd_this->element_context.
      DATA lv_read_only LIKE ls_context-read_only.
    * get element via lead selection
      lo_el_context = wd_context->get_element(  ).
    *********read_only is the attribute name bound to the read only *********property of the input field.
    * get single attribute
      lo_el_context->set_attribute(
          name =  `READ_ONLY`
          value = '' ). *** you can pass x to make it read only
    ***** to clear the values
    lo_el_context->set_attribute(
          name =  `INPUT_MATNR` * this clears my input field.
          value = '' ).
    ---regards,
       alex b justin

  • Hi,how can i change the default settings on my adobe readerX1 such that it will display all my pdf files according to their individual cover pages (as cover picture thumbnails)before i click them to open and read........i really enjoyed this feature as a

    hi,how can i change the default settings on my adobe readerX1 such that it will display all my pdf files according to their individual cover pages (as cover picture thumbnails)before i click them to open and read........i really enjoyed this feature as a default settings upon installation in previous editions of adobe reader .i use a windows 8 pc now.thank

    For sideloaded content the nook pulls the metadata from ePub file itself.  I would suggest looking at a program like Sigil or Calibre that will let you edit the metadata in the book to make it appear like you want.
    For the PDF vs ePub - No, that's the way PDFs work (think of them as graphics, not text), wheres ePubs are Web Pages - so  no you can't them to behave exactly alike without converting the files.

  • When I opt to "download this as a file" from my email account, Firefox defaults to notepad to open the file. How can I change the default to MS Word?

    Question
    When I opt to "download this as a file" from my email account, Firefox defaults to notepad to open the file. How can I change the default to MS Word?

    Is FF downloading the file as a .txt file? If so, go to "Folder Options" in the windows control panel. Click on the "File Types" tab. Scroll down until you reach the TXT file extension. Look to see what that extension opens with (lower part of panel). It probably shows notepad. Click on the <Change> button. Scroll down until you find "Microsoft Word." Select it and click the <OK> button. That should show the TXT extension is now associated with Microsoft Word. Click the <Close> button at the bottom of the panel.
    If FF is downloading the file as any other type, use the same process as above except look for the corresponding extension instead. If the extension is not listed click on the <New> button and create an association using the extension in the file name and then associate it with MS Word.
    davewdan

  • I have updated my iphone 5s to iOS8 but it has my old icloud account, how can i change the icloud email address as i can not get passed this page?? please help :-(

    i have updated my iphone 5s to iOS8 but it has my old icloud account, how can i change the icloud email address as i can not get passed this page??
    I do not know the log in details and no longer have that icloud email address !!
    please help :-(

    That's Activation Lock. You will need to remember the Apple ID and password you used to set up the phone.
    If you can't remember them, you can go to iforgot.apple.com to try to recover the information.
    If you are the original owner of the phone & have proof of purchase, you can try calling Apple to see if they can assist also.
    ~Lyssa

  • How can i change the icloud account on my iphone?? so that this account is not related to my iphone any more

    How can I change the icloud account on my iphone?? so that this account is not related to my iphone any more.....

    tohamy wrote:
    How can I change the icloud account on my iphone??
    From  the  More Like This  section on the right
    how to change icloud account on my iphone

  • I used part of my name in my home network.  Now I understand this was stupid security error.  How can i change the name of my home wifi network, airport express?  Thanks.

    I used part of my name in my home network.  Now I understand this was stupid security error.  How can i change the name of my home wifi network, airport express?  Thanks.

    Open Macintosh HD > Applications > Utilities > AirPort Utility
    Click on the picture of the AirPort Express
    Click Edit in the smaller window that appears
    Click the Wireless tab at the top of the next window
    Edit the Wireless Network Name
    Keep it short.....maximum 10-12 characters or so. No blank spaces or punctuation marks in the name
    Click Update at the lower right of the window to save the new setting and wait a full minute for the AirPort to restart

Maybe you are looking for

  • Crysis Warhead 64-bit Won't Work with Windows 7 64-bit Under Boot Camp

    Hi. I installed the patch 1.1 for Crysis Warhead which has the 64-bit version of the game which I'm running under Windows 7 64-bit on Boot Camp and I've tried the the compatibility mode (Vista to Vista SP2). I've also updated the ATI drivers as well

  • Parent Child In Same Table Management

    I have a simple entity (Process) which has ID and Name. It also has Parent property which reference the parent Process of this one. When the user ask to delete a process, I have to disconnect its children from it, otherwise I'll have a reference inte

  • How to  get button to go to another scene? Error #2108 scene not found.

    Hi flash users, I believe I'm not alone in this problem but I don't see any answers in any of the forums. I have a movie clip that has a button that I wish to take me and play my first scene at frame 1. I labeled my the 1st frame "startLabel" and my

  • C API  for JMS in LINUX

              Hi,           I have developed an appication using JMSCAPI in windows. Now i have to migrate           the code to linux C. pls help me in finding JMSCAPI for Linux .           Thanx and Regards           Venkat           

  • Relationship display in publications

    Hi everybody, we are looking for a way to display related items, e.g. accessories, in a separate table in Publisher. Currently, the way relationships are displayed as additional column in the table of items, but only with the display fields. I would