Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,207,657 members, 7,999,880 topics. Date: Monday, 11 November 2024 at 03:20 PM

Any Netbeans User To Help Me Out Of This Hook. - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Any Netbeans User To Help Me Out Of This Hook. (1551 Views)

Redirect User To Different Pages On First Time Login / Is Anything Better Than The Netbeans Ide? / Netbeans Vs Eclipse Vs Jboss (2) (3) (4)

(1) (Reply)

Any Netbeans User To Help Me Out Of This Hook. by hymnha(m): 9:19am On Apr 02, 2009
These are some of the problems i have with netbeans. I'm new to it.
1. I created a JFrame that has a menu. A menu item is used to display another JFrame (say JFrame2). When i close the JFrame2, The first JFrame closes Automatically. How do i make them independent.


2. I want to set a tab order. I used a JTextArea Component. if I press tab after filling some information into the JTextArea, it moves some spaces still in the same JTextArea and does not move the cursor to the next Component.


3. Another problem i have is that, i want to use code to add component such as a JTable to a JFrame created by netbeans, and since netbeans automatically creates the code in the init() method of the form i am confused. I have tried all sort of codes using add(); method in the constructor and it is not being fruitful. Pls help me out.

Thanks
Re: Any Netbeans User To Help Me Out Of This Hook. by hymnha(m): 12:06pm On Apr 04, 2009
Does it mean that there is no netbeans user on this forum that can help me out.
Re: Any Netbeans User To Help Me Out Of This Hook. by Danyl(m): 4:21pm On Sep 06, 2012
hymnha:
These are some of the problems i have with netbeans. I'm new to it.
1. I created a JFrame that has a menu. A menu item is used to display another JFrame (say JFrame2). When i close the JFrame2, The first JFrame closes Automatically. How do i make them independent.


2. I want to set a tab order. I used a JTextArea Component. if I press tab after filling some information into the JTextArea, it moves some spaces still in the same JTextArea and does not move the cursor to the next Component.


3. Another problem i have is that, i want to use code to add component such as a JTable to a JFrame created by netbeans, and since netbeans automatically creates the code in the init() method of the form i am confused. I have tried all sort of codes using add(); method in the constructor and it is not being fruitful. Pls help me out.

Thanks
@OP, i think i understand some of ur questions.
If u add a Jframe to ur frame which u invoke when u click a button or, all u av 2do is:
1. for d Jframe u added, use dis method within d class constructor
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE) if u r using codes, if its netbeans,check d properties windows on d right hand side of d window, u'll c d properties there,check one by one,where u find EXIT_ON_CLOSE, DISPOSE_ON_CLOSE, Choose DISPOSE.
2. If u want to add a JFrame to a parent JFrame class, by using a button,add d button 2d actionlistener interface, code d actionperformed(ActionEvent evt) method, n get d source of d event using d getSource() whc return d button object u want 2 use for that purpose,then, use somethn like dis
if(evt.getSource()==button)
MyFrame frame= new MyFrame();
code d MyFrame seperately and compile it. Dat code wil automatically create d Frame u want to add to ur parent JFrame.
I used my fone to do this if i get on my system i'll gv a thorough sample code,bt try that.

If u want to add anoda jframe usn netbeans,u av anoda JFrame class,use d new file->swing frame->enter d name of ur new frame class.
On d parent frame, add d button u want to use 2cal d new JFrame2.
Left click n choose events on d button, scroll down 2 action events and add d codes i wrote earlier where ur MyFrame is d second frame class u just created.

(1) (Reply)

Need A Free Integrated C/C++ Compiler / Nhibernate Brief / Creating Mobile Apps As A Tool For Creating More Job In Nigeria

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 16
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.