File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Jtextbox entering values into db(concerns with datatype)

 
Yuta Lolap
Ranch Hand
Posts: 86
Eclipse IDE Java jQuery
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a textbox JTextbox custmobo = new Jtextbox(10); in which i am entering a mobile no.

I have column with similar in my customer table of number type(custmobnonumber(10));


using a prepared statement to fire insert query while registering a user. So code goes as follows. But it doesnt seem to work properly



Ps: make an obj and call the frame because i am calling it from another one.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yuta Lolap wrote:I have column with similar in my customer table of number type(custmobnonumber(10));


What exactly is the type of that column in database? And what do you mean by "But it doesnt seem to work properly"?
I would also check the layout of components in your frame, this is probably not the way you want your frame to look like since some of them are not visible.
 
Yuta Lolap
Ranch Hand
Posts: 86
Eclipse IDE Java jQuery
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Kemal Sokolovic,


I got the button problem fixed. Had issues with the size of the datatype that i had used in the database table. Sizes mentioned in database and textfield were not matching. Thanks for replying anyways.

Also, i know the layout is worse. I havent worked with layouts. I want to desgin a simple registration form. But it is difficult to place them with Grid view. Can you please help me out to make it more presentable?

Thanks,
Yuta Lolap.
 
Kemal Sokolovic
Bartender
Posts: 825
5
Java Python Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I prefer GridBagLayout because of flexibility it offers. It might look difficult to catch up with at first, but as almost everything else it is a matter of excercise and experience. You should check this tutorial, work through examples provided and try to layout components in your frame accordingly. I would suggest you draw a grid on a paper and place components inside it. Once you are satisfied with a sketch, try to implement it. And of course, if you come to an issue feel free to ask.
 
Yuta Lolap
Ranch Hand
Posts: 86
Eclipse IDE Java jQuery
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Kemal Sokolovic ,

Thank you so much for your guidance and help! I am really grateful. I will definately look into the tutorial. Will surely contact you if i come across anything.

Thanks,
Yuta Lolap.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic