NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

Can't make JTextField invisible at startup

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
nocturn4l3030



Joined: 13 Oct 2009
Posts: 4

PostPosted: Thu Oct 22, 2009 3:50 am    Post subject: Can't make JTextField invisible at startup Reply with quote

Under the textfield properties there's no visible setting.. i know you can set it in the code with JTextField.visible(false), but how do i get it to do it at startup?

I tried putting it after the initComponents(); line.. and I even tried manually editing the code that it won't let me through netbeans by adding JTextField.visible(false) when it initializes/creates my JTextField, but no matter what, the JPanel it's created on for some reason disappears..or rather shrinks really small width-wise

yet if i add JTextField.visible(false) to a button or something it works fine

any way around this?
Back to top
efred



Joined: 12 Sep 2009
Posts: 27

PostPosted: Thu Oct 22, 2009 12:46 pm    Post subject: Reply with quote

MyTextField.setVisible( etc
I hope this is some help.
Back to top
Bayless Kirtley
Posted via mailing list.





PostPosted: Thu Oct 22, 2009 1:26 pm    Post subject: Can't make JTextField invisible at startup Reply with quote

Not sure what you have done but the simple answer is put the code
myFieldName.setVisible(false) in your code, maybe in the constructor for
your main JFrame. That's what I typically do.

Bayless

----- Original Message -----
From: "nocturn4l3030" <address-removed>
To: <address-removed>
Sent: Wednesday, October 21, 2009 10:51 PM
Subject: [nbusers] Can't make JTextField invisible at startup


Quote:
Under the textfield properties there's no visible setting.. i know you can
set it in the code with JTextField.visible(false), but how do i get it to
do it at startup?



I even tried manually editing the code that it won't let me through
netbeans by adding JTextField.visible(false) when it initializes/creates
my JTextField, but then the JPanel it's created on for some reason
disappears..



yet if i add JTextField.visible(false) to a button or something it works
fine



any way around this?



Back to top
efred



Joined: 12 Sep 2009
Posts: 27

PostPosted: Thu Oct 22, 2009 2:41 pm    Post subject: Reply with quote

.visible

.setVisible( this is a function
.visable I dont know what this means I must run please
excuse this answer
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo