BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

JFormattedTextField in a applet

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Applet Issues
View previous topic :: View next topic  
Author Message
Owen
Guest





PostPosted: Sat Apr 09, 2005 5:03 pm    Post subject: JFormattedTextField in a applet Reply with quote



Hello:

I try to use the JFormattedTextField in a applet, but I can't becuase I
create the JFormattedTextField component inside applet class:

.... extends Applet {
JFormattedTextField jFormattedTextField1 = new JFormattedTextField();

....

//Component initialization
private void jbInit() throws Exception {
jFormattedTextField1.setDoubleBuffered(false);
jFormattedTextField1.setEditable(true);
jFormattedTextField1.setEnabled(true);
jFormattedTextField1.setForeground(Color.black);
jFormattedTextField1.setSelectionStart(0);
jFormattedTextField1.setText("");
jFormattedTextField1.setBounds(new Rectangle(82, 299, 159, 20));

MaskFormatter mf1 = new MaskFormatter("######");




then I can't assign this MaskFormatter to this jFormattedTextField1, becuase
the method is protected. Then I have to assign this Formatter to the
jFormattedTextField1, but I don't know how, please if you give some code
but, please be the must explicit that you can, because I a begginer, in the
maskformatter that I want is accept exactly 6 number, it's not correct,
please help in this too.

Best Regards,
Owen


Back to top
David Orriss, Jr. [TeamB]
Guest





PostPosted: Mon Apr 11, 2005 4:05 am    Post subject: Re: JFormattedTextField in a applet Reply with quote



On Sat, 9 Apr 2005 13:03:19 -0400, Owen wrote:

Quote:
I try to use the JFormattedTextField in a applet, but I can't becuase I
create the JFormattedTextField component inside applet class:

That's because you're trying to combine Swing and AWT. You need to extend
JApplet instead of Applet. AND your applets will need to use the Java
Plugin.

--
David Orriss Jr. TeamB
http://www.davenet.net/
* Please limit all responses to the newsgroups. Thanks! *
Got a JBuilder website? Join the JBuilder Netring! Check out
http://www.davenet.net/jbwebring/jbwebring.htm for more information!

My blog: http://mywebpages.comcast.net/daorriss/

Save yourself some time and check these sites:

Borland Newsgroup Search:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's Faq-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html

Back to top
Owen
Guest





PostPosted: Wed Apr 20, 2005 8:26 pm    Post subject: Re: JFormattedTextField in a applet Reply with quote



Hello:

Thanks for you answer, but please can you give me some example code of my
doubt with your soluction, How extend this to JApplet and how use
JFormattedTextField in this example.

Best regards,
Owen.


"David Orriss, Jr. [TeamB]" <jbuilder_man (AT) davenet (DOT) net> wrote

Quote:
On Sat, 9 Apr 2005 13:03:19 -0400, Owen wrote:

I try to use the JFormattedTextField in a applet, but I can't becuase I
create the JFormattedTextField component inside applet class:

That's because you're trying to combine Swing and AWT. You need to extend
JApplet instead of Applet. AND your applets will need to use the Java
Plugin.

--
David Orriss Jr. TeamB
http://www.davenet.net/
* Please limit all responses to the newsgroups. Thanks! *
Got a JBuilder website? Join the JBuilder Netring! Check out
http://www.davenet.net/jbwebring/jbwebring.htm for more information!

My blog: http://mywebpages.comcast.net/daorriss/

Save yourself some time and check these sites:

Borland Newsgroup Search:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's Faq-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html



Back to top
Arthur Ore
Guest





PostPosted: Thu Apr 21, 2005 7:57 am    Post subject: Re: JFormattedTextField in a applet Reply with quote

Have you looked in Sun's tutorial?

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

Arth

"Owen" <anibal (AT) prensa-latina (DOT) cu> wrote

Quote:
Hello:

Thanks for you answer, but please can you give me some example code of my
doubt with your soluction, How extend this to JApplet and how use
JFormattedTextField in this example.

Best regards,
Owen.




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> JBuilder Applet Issues All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.