Which LayoutManager to use for this purpose.

I am trying to set a panel inside JTableColumn. The panel consists of JTextField and a Button. The Button is very small in size and should appear in the SouthEast portion of the panel. The remaining space should be used up by JTextField. Which LayoutManager will help me achieve this. Here is a diagram of the layout of panel that I want.
(----) stands for JTextField area and (||||) stands for the JButton.
------------------------|||||||||
-------------------------------Please Note that the width of Panel is not known as it depends on the size of table column.
regards,
nirvan.

Guys,
Thanks for the replies. I achieve what I wanted using BorderLayout. Here is the program demonstrating what I was looking for. It's an SSCCE. The problem is solved.
package com.ns;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.JButton;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.WindowConstants;
public class PropertySheetLayout extends javax.swing.JFrame {
    // Variables declaration - do not modify
    private JPanel dummyPanel;
    private JTextField inputText;
    private JButton lookUpButton;
    private JPanel outerPanel;
    // End of variables declaration
    public PropertySheetLayout() {
        initComponents();
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
        outerPanel = new JPanel();
        inputText = new JTextField();
        dummyPanel = new JPanel();
        lookUpButton = new JButton();
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        getContentPane().setLayout(new FlowLayout());
        outerPanel.setBorder(BorderFactory.createEtchedBorder());
        outerPanel.setPreferredSize(new Dimension(150, 75));
        outerPanel.setLayout(new BorderLayout());
        inputText.setBorder(null);
        inputText.setPreferredSize(new Dimension(100, 20));
        outerPanel.add(inputText, BorderLayout.CENTER);
        dummyPanel.setBackground(Color.white);
        dummyPanel.setPreferredSize(new Dimension(25, 75));
        dummyPanel.setLayout(new BorderLayout());
        lookUpButton.setText("jButton1");
        lookUpButton.setPreferredSize(new Dimension(25, 25));
        lookUpButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                lookUpButtonActionPerformed(evt);
        dummyPanel.add(lookUpButton, BorderLayout.SOUTH);
        outerPanel.add(dummyPanel, BorderLayout.EAST);
        getContentPane().add(outerPanel);
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-408)/2, (screenSize.height-334)/2, 408, 334);
    }// </editor-fold>
    private void lookUpButtonActionPerformed(ActionEvent evt) {
        inputText.setText(JOptionPane.showInputDialog("Enter your Name"));
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new PropertySheetLayout().setVisible(true);
}regards,
nirvan.

Similar Messages

  • I have Mac Pro 2007, which have no bluetooth hardware. What should I do to use Apple wireless keyboard and magic mouse??? Can 'third party's internal bluetooth card' be used for this purpose? Help please...

    I have Mac Pro 2007, which have no bluetooth hardware. What should I do to use Apple wireless keyboard and magic mouse??? Can 'third party's internal bluetooth card' be used for this purpose? Help me please...

    You can find the Apple Bluetooth card on eBay for as little ten dollars (says its for the 2008 model Mac Pro, not sure about the 2007).
    http://www.ebay.com/itm/Bluetooth-Board-iMac-and-Mac-Pro-922-8233-922-8233-/1208 49278570
    Here is a link to a full explanation of the card and how to install it. Part numbers may differ a bit as that is an old article and newer models have come out.
    http://www.xlr8yourmac.com/systems/Mac_Pro/Bluetooth_MacPro_install/Bluetooth_Ma cPro_install.html
    Just make sure that the part will work in your model Mac Pro. To that end, you may be better off avoiding eBay and going to a parts reseller. There are even third party cards that use the internal Apple bluetooth slot.
    http://fastmac.com/bluetooth.php
    In theory, using a USB or PCI card will work at login so long as it is recognized by Apples drivers. You say you need to launch an application to use your current USB Bluetooth dongle? If it is not controlled by the Bluetooth icon in the menu bar then it must be using a third party driver of some sort. Unfortunately, I don't know off hand which USB and PCI cards are supported.

  • What Extractor can be used for this purpose?

    Hi all
    I have a requirement for a new report. The user wants to get a report regarding inbound cost saving including materials, material group, MRP controller, vendor, date, qty, actual inbound transportation cost, standard transportation cost which is fixed in SAP and variance between actual and standard.
    Can any one advice me what Extractor and Extract Structure can be used for this purpose?
    Thanks in advance
    Ishi
    Edited by: eletter on Sep 28, 2009 11:11 AM

    Hi
    Extract structure
    The extract structure, data from a DataSource is staged in the source system. The extract structure contains the amount of fields that are offered by an extractor in the source system for the data loading process.
    Extractors
    Extractors is a data retrieval mechanisms in the SAP source system. Which can fill the extract structure of a data source with the data from the SAP source system datasets. The extractor may be able to supply data to more fields than exist in the extract structure.
    Hope this helps you
    santosh

  • How, step by step, can one backup Quicken Essentials on a CD?  (When I insert a new blank and unlabeled CD to use for this purpose, no CD logo appears on my desktop.)

    How, step by step, can one backup Quicken Essentials on a CD?  When I insert a blank unlabeled CD for this purpose, no CD logo appears on my desktop.  Moreover, when I select BACKUP on the Quicken Essentials File drop-down menu, the CD is not listed as an optional place to backup. 

    Quicken Essentials isn't an Apple product, I'd suggest posting on an Intuit or Quicken Essentials forum. That is where users of their software will probably be hanging out.

  • Which widgets did used for this website?

    Hi Guys
    I have just visited the http://fashionologieedina.com/index.html  nicely designed by Ptauly.
    What widget did he used for top banner (Sliding the images)? or how did he created that banner in Muse?
    regards.
    sanjay

    Hi Sanjay,
    It looks like the designer has just used a 'Blank Slideshow' widget and deselected the 'Prev/Next/Captions/Counter' options from the widget menu (the little blue arrow next to your widget) and added their own images.
    You can add your own images by clicking the folder icon on the widget menu, then enable 'Thumbnails' so you can see which pictures are in your slideshow, then select the default pictures that you don't need in your slide (usually the flower pictures) and just delete them, then turn the thumbnails back off.
    Hope this helps.
    Regards,
    Karl

  • Has Adobe sold me a product which I cannot use for my purpose?

    Hi! I bought my copy of Adobe Acrobat XI a couple of months ago mainly to work with FormsCentral and I was very suprised to hear that FormsCentral was going to shut down. Has Adobe sold me a product which I cannot use and how will I be compensated for this? /M

    Many educational CDs have not been upgraded due to lack of funds in the educational market to pay for the such updates.
    This situation is due primarily to the fact that one of the major political parties in this country favors tax cuts to the rich while cutting federal educational support funding (or eliminating the federal Department of Education altogether).
    However, you can restore Rosetta and run your educational CD if you install Snow Leopard Server ($20) into Parallels (up to $79) for use in Lion/Mt. Lion/Mavericks:
                                  [click on image to enlarge]
    More information here:
    http://forums.macrumors.com/showthread.php?t=1365439

  • Please help...Its really urgent- Which class to use for this?

    Can someone help me with this? I want to read characters from a file
    Ultimately I want to load some information from a text file which has information like this:
    0123456789
    0
    1
    4
    10
    X0123456789
    01202120212
    11202120212
    20212021202
    I want to load the information from X onwards .. all the rows and columns in a 2D array..
    I am not able to read the file at all ...
    I tried RandomAccessFile, BufferedReader..... They had problems.....what class sould I use.. any if you can give hints how I can reach X and start reading to 2d array...... It will be really very very helpful........
    Please help......

    Hi...
    See this is the partial code
    class LanguageRecognizer
         String word;
         String fileName;
         BufferedReader reader;
         char transitionTable[][];
         char letters[];
         char startState;
         char endStates[];
         int rows;
         int columns;
         public void getFileName(String fileName_)
              /********** Create File Objects to read file ******************************/
              try{
              this.fileName = fileName_;
              java.io.BufferedReader reader = new java.io.BufferedReader(new FileReader(fileName));
                   /***** Read File **************/
                   int i;
                   int X = 0;
                        /** as long as its not the EOF **/
                        while((i=reader.read()) != -1)
                             //Print all characters
                             System.out.println((char)i);
                             if (((char)i)=='X')
                                  X = i;
                                  System.out.println("X is at "+(char)i);                         
                             }//if
                        }//while          
              catch(Exception e)
                   e.printStackTrace();
              /**Call Prompt user and ask user to enter a word****************************/
                   promptUser();
         }//getFileName()When I say
    The while loop prints this file containing:
    0123456789
    0
    1
    4
    10
    X0123456789
    01202120212
    11202120212
    20212021202
    But it prints it in this format :
    0
    1
    2
    3
    4
    5
    6
    7
    8
    9
    //Want to take this in the letter[]
    0 //want to take this as the startstate
    1 // This is the end state which could be more than one so in endState[]
    4 // This is the number of rows in the transition table
    1 // This is columns
    0
    //This is the transition table that I want in a 2D array......
    X // This is the X printed with the if() in the code
    X
    0
    1
    2
    3
    4
    5
    6
    7
    8
    9
    0
    1
    2
    0
    2
    1
    2
    0
    2
    1
    2
    1
    1
    2
    0
    2
    1
    2
    0
    2
    1
    2
    2
    0
    2
    1
    2
    0
    2
    1
    2
    0
    2
    So I want to capture each letter typed in arrays.......But I am not able to seperate them and get them in my datatypes... atleast not using this class BufferedReader.... so can I use this class and get it or which class can I use??

  • Which trigger to use for this?

    Hello,
    I have this code here that should stop the user from creating a new record (therefore not adding it to the tree) if the value of sublevel = 0.
    I dont know which trigger I can use to make this kind of validation.
    declare
    v_group_code varchar(12);     
    var number;
    begin
    v_group_code:= ftree.get_tree_node_property('CONTROL.GROUP_TREE',nvl(:SYSTEM.TRIGGER_NODE,1),FTREE.NODE_VALUE);
    :parameter.grup_cd_selected     :=  v_group_code;
    select SUB_LEVEL
    into var
    from pyr_group
    where code = v_group_code;
    if var = 0 then
              message('You cannot create group here.');
              message('You cannot create group here.');
              RAISE form_trigger_failure;
    end if;
    end;Thank you

    Hi
    This code here that should stop the user from creating a new record (therefore not adding it to the tree) if the value of sublevel = 0.Pls try to use WHEN-CREATE-RECORD Trigger
    Hope this helps...
    Regards,
    Abdetu...

  • Which legacy systems are used for what purpose?

    Hi gurus,
    I tried looking in this forums, but couldnt gather much information on which legacy systems are used and for what purpose? <b>can any body send me a link that can help me understand when and where, which systems are used for what purpose..</b> I have a general understanding of Legacy systems so i am not looking for terminology explanation,  i would appreciate any thing that is related to business and explains the purpose.
    thanks,
    kishore karnati

    Hi,
    Term legacy system means tailor made system by group of software developer or any branded software which deals with the group requirement  like tally we user for finance.
    Legacy system can be based on any technology like visual basis as front end and oracle as back end or Developer 2k as front end and oracle as back end. For report most of the legacy system we have seen uses crystal report.
    You can develop and implement based on the requirement from the user though you need to define some specify process to keep the system streamline which is in your hands.
    Concept like devlopment/quality/production we don't have that verys strict concept.
    More and more they are not intergrated each other functionally mean lets say inventory has come to the godown then your vendor outstanding should increase in finance which does not happens you need to key in the seperate value for it.
    Hope this helps!!!

  • HT201328 I'd like to unlock my iPhone 5 for use on a trip overseas. Is it possible to unlock it for this purpose?

    I'd like to unlock my iPhone 5 for use on a trip overseas. Is it possible to unlock it for this purpose? I bought it before January 26th, so my understanding is that it is legal for me to do so without carrier approval.
    To be clear, I don't wish to leave AT&T when in the US, but while visiting my wife's relatives we really need a local number that they can call. I asked AT&T to do it for me, but they refused. I know there are shady ways to get it done, but honestly, if I wanted to live in that realm, I would have bought an Android.
    Thanks in advance!

    I'm not saying you're definitely wrong about the legality, but I certainly have different information:
    http://arstechnica.com/tech-policy/2013/01/unlocking-new-cell-phones-to-become-i llegal-on-saturday/
    I'm no lawyer, but the official document appears to support my assertion that unlocking a phone purchased before January 26th is grandfathered into the prior exemption which allowed unlocking any phone at any time.
    http://www.gpo.gov/fdsys/pkg/FR-2012-10-26/html/2012-26308.htm
    Thanks for mentioning the warranty issue. I cannot find an authoritative reference regarding it, though. What I have read indicates that Apple has been fairly vocal about stating that jailbreaking may void your warranty, but has been pretty quiet about unlocking. None of these posts, however, gives any reference either way, so it is difficult to ***** the accuracy.
    I'm open to hearing different information as I definitely do not know everything about this subject.
    If possible, can you reference your sources?

  • I am trying to use Find My Phone for people to follow me on the NYC Marathon next week.  Is there a way to set up a temporary User ID and Password to give out to people for this purpose?  I would obviously want to delete that log in info after the race.

    I would like to use Find My Phone for friends and family to follow me during the NYC Marathon next week.  Is there a way to set up or temporarily change my User ID and Password for this purpose?

    New York Runners has an app that is specially designed to do exactly that. It's (or will be) available in the App Store.
    http://www.nytimes.com/2011/10/27/sports/for-new-york-city-marathons-fans-a-cell phone-app-to-keep-in-touch.html?ref=technology
    You might also look at apps like RunMeter. It will let you send updates by email, Facebook or Twitter. Glympse is another app that, though not designed specifically for runners, might also be useful.

  • HT204053 I had Snow Leopard and was using iWeb and Filezilla for my website (not MobileMe). Wanting to move to single-click publishing, I now find it is not supported by iCloud and Mountain Lion. I feel cheated, having bought it mainly for this purpose!

    I had Snow Leopard and was using iWeb and Filezilla for my website (not MobileMe). Wanting to move to single-click publishing (supported by MobileMe), I now find it is not supported by iCloud and Mountain Lion. I feel cheated, having bought it mainly for this purpose! The other thing they don't tell you is that Mountain Lion disables OfficeMac, and I am considering uninstalling it for that reason - do I get my money back?!

    You stated; "Mountain Lion disables OfficeMac"
    That is not true.
    Mountain Lion does not have Rosetta so it is not capable of executing PowerPC code. If you have MS Office 2004 that is coded in PowerPC code and will not run in Mountain Lion. What you need to do is upgrade to an Intel version of Office.
    Allan

  • I have a licence code for Adobe CS6 Master Collection which I'm using for more  than a year, suddeny I am in trial mode (all programs)  an it seems that this code is not accepted anymore. Help needed!!

    I have a licence code for Adobe CS6 Master Collection which I'm using for more  than a year, suddeny I am in trial mode (all programs)  an it seems that this code is not accepted anymore. Help needed!!

    Chat Now button near the bottom for Activation and Deactivation problems may help
    http://helpx.adobe.com/x-productkb/policy-pricing/activation-deactivation-products.html

  • I have an AT&T locked phone valid contract for another year. I am planning for India visit for 3 months and I want to unlock my phone to use for my purpose. Apple care can help on this? or AT&T Customer care?

    I have an AT&T locked phone valid contract for another year. I am planning for India visit for 3 months and I want to unlock my phone to use for my purpose. Apple care can help on this? or AT&T Customer care?

    It's not going to happen. Even a cursory reading of the forums would have revealed this fact.
    Apple can NOT help you. AT&T WILL NOT help you.
    Leave your iPhone at home or in airplane mode while you're in India and buy yourself a cheap disposable phone to use while you're in India. I believe AT&T still has a program where they will put your account "on hold" while you are gone for a small fee.

  • I Have to set Rej.Ind in ME47...which BADI or Exit is used for this.

    Hi experts,
                  Can anybody suggest me. If we I have to set permanent Rej.Ind in ME47, which BADI or Exit will be used for this.
    Thanks
    Pankaj

    Hello,
    Check with following BADIs. It may help.
    ME_PROCESS_PO
    ME_PROCESS_PO_CUST
    Regards
    Arindam

Maybe you are looking for