i m working on a project and i want to implement a java code such that if user enters a number say 5 then after submitting on the next frame 5 textboxes should be displayed??
please help me!!
bivashkumar41
0
Newbie Poster
Recommended Answers
Jump to Postwell you simply creat 5 textboxes dinamically, there is no big deal:
int user_input = getUserInput(); //your method to get this input int count = 0; while(count <= user_input){ JTextField dinamyc_textfield = new JTextField(); dinamyc_textfield.setVisible(true); dinamyc_textfield.setBounds(/*Do some math here to get the correct bounds*/); dinamyc_textfield.setName(String.valueOf(count)); next_frame.add(dinamyc_textfield); count++; …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.