This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Background of problem : I have created a Form that has several Text field, trying to link to the backend DB to display data on the from.
Problem : I have used the fieldName.setText property to set the value that I am getting from the Query, for some reason it is not setting the value..
As you can see, the System.out.print does print the values right.. But I cannot see it on my Form view.. Why would that be?
Does it make a difference if they are on different panels? I have one jFrame and three jPanels.. All the text fields are scattered among these panels like Title maybe in Panel1 and F_Name in Panel2 etc....
Well, clearly you've done something wrong then. But from the code you've posted, it's impossible to tell what that is. In fact we can't even tell what kind of component txt_TITLE is.
So you're going to have to post your code. But we don't want to see 900 lines of code, if that's what you have. What we need to see is a small example which demonstrates the problem. Read the page here: SSCCE which explains that in more detail.
Andrew Geroge Alexander
Joined: Feb 14, 2012
Hello.. Sorry it was something I did.. I called a non static function by creating an object, before the default constructor was called.. thus making the previous object void/overridden by the normal constructor.. So i deleted the default coding and it works..