how can u reduce the size of textfield?

Ads
 

how can u reduce the size of textfield?

how can u reduce the size of textfield?

thanks in advance

View Answers

September 29, 2011 at 11:49 AM

import javax.swing.*;

   public class ReduceTextField extends JFrame {
        public static void main(String[] args) {
           JTextField text1 = new JTextField(20);
           JTextField text2 = new JTextField(10);
           JFrame f=new JFrame();
           f.setLayout(null);
           text1.setBounds(10,10,100,20);
           text2.setBounds(120,10,100,10);
           f.add(text1);
           f.add(text2);
           f.setVisible(true);
           f.setSize(300,150);
          }
    }

Ads









Related Tutorials/Questions & Answers:
how can u reduce the size of textfield?
how to reduce width of jbutton ?
Advertisements
can u plz help out how to attach file directly & send to a particular mail id
how to set size of button,textfield.
How to insert data from textfields into database using hibernate?
TextFields
CAN U HELP ME TO CODE IN JSP FOR ONLINE VOTING SYSTEM
can u help me to get a calendar with color codes on days ???
How to find hashtable size in Java?
plz help me any one as fast as u can
labels,textfields,buttons
In Java how to get size of class and object?
In Java how to get size of class and object?
how to increas size of button (especially width)
how to check the size of a tar file in linux
How to Increase Upload File Size Limit in php
How to decrease image thumbnail size in java?
how to set fetch size for jdbc odbc driver
How a split a file into many based on size?
How to open textfields in the the same panel of the jframe by selcting from dropdown menu option ...
making of dynamic textfields using swings
this code gives addition of 2 numbers in j2me..but the code is not executing ..can u pls find out the error...??
displaying List of records from database in a jsp using ajax, onclick it should display the results ?? its urgent can u help me
How to set UILabel text size, color etc.. in XCode
How Jdbc program can be run??
displaying output on web page immediately whent the jsp buffer size is full. And how to set jsp buffer size in bytes
ModuleNotFoundError: No module named 'astro-reduce'
ModuleNotFoundError: No module named 'async-reduce'
ModuleNotFoundError: No module named 'async-reduce'
ModuleNotFoundError: No module named 'neuron-reduce'
ModuleNotFoundError: No module named 'pyshell-reduce'

Ads