Solved

How will you set the maxlength for a TextField or JtextField?

Posted on 2001-07-29
5
323 Views
Last Modified: 2011-10-03
Hi Guys,

I have a doubt regarding the TextField and JTextField.
Is it possible to set the maxlength property for a TextField and JtextField ?, If possible, how will u do that? please reply immediately.
     Also , how will you align the Frame and JFrame to the center of the screen. (Don't say we can use setBounds and move methods).

Regards,
Bakyaraj.
0
Comment
Question by:bakyaraj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 6

Expert Comment

by:kotan
ID: 6333137
>center of the creen

java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
       setLocation((screenSize.width-300)/2,(screenSize.height-200)/2);
0
 
LVL 6

Accepted Solution

by:
kotan earned 50 total points
ID: 6333139
>center of the screen

java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setSize(new java.awt.Dimension(300, 200));
        setLocation((screenSize.width-300)/2,(screenSize.height-200)/2);
0
 

Author Comment

by:bakyaraj
ID: 6333165
what about the answer for maxlength property for a TextField and JtextField ?
0
 
LVL 6

Expert Comment

by:kotan
ID: 6333207
Plese refer this on section "Customizing a Document"

http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html
0
 

Author Comment

by:bakyaraj
ID: 6336750
is there anyone to help me?
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
The viewer will learn how to implement Singleton Design Pattern in Java.

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question