J Noble

Greenhorn
+ Follow
since Aug 17, 2014
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by J Noble

Perfect!

Just what I needed. Thanks a lot.

J
4 years ago
Hi folks,

I'm almost there,

Im using a box Layout with horizontal glue as suggested by Darryl.

Looks OK apart from the 2 inner panels are still growing in size when the frame is resized (along with the gap in the middle). I just want the gap in the middle to grow / shrink

I have tried to set the preferredSize to the inner panels but it does not seem to make any difference.

Can anyone advise ?

Here is an inner panel class...



The panel has 5 buttons inside it. I want the width of the panel to be slightly longed that the combined width of the 5 buttons. I need to add 300 to do this. Not sure why ???

Thanks,

J
4 years ago
I am trying to create the following Layout:

I have an outer panel.

I want 2 panels inside the outer panel. One aligned to the left; the other to the right with space between them

Which layout manager should I use.

Thanks.

4 years ago
Hi folks,

I want to find out more about writing Java apps for the web. I have purchased the book 'Headfirst Servlets & JSP'. It says that I need to install TOMCAT.

If I install TOMCAT on my own laptop I can write an app on that. However, will I be able to just upload my app to a website that I pay a hosting company for or must be TOMCAT compliant or require specific changes made to my set up?

Apologies if this is a dumb question but I need to find this out before I start.

Thanks.
4 years ago
Thanks everyone for the feedback.

I think I'll still continue in the meantime to build GUIs without a builder until I have a fuller uderstanding of how it all works. Then I will try it out.

Thanks,

J
4 years ago
Hi folks,

I am doing an online course in Java. Mainly for Windows Applications using Eclipse.

In the course that I m doing the Instructor has said that most Java programmers dont bother with GUI builders and tend to hand code everyhing. Is this correct? I ask because my previous language I made good use of a GUI builder due to its ease and speed.

Is this because the code is more stable than the generated code offered by GUI builders in Java or is it just better to have full control and to gain a better understanding on how it all works with the layout managers?

Thanks,

J
4 years ago
Hi Stephan,

Just to clarify, when you say add a list for selecting records, do you mean something like a JTable. I could then popultae the JTable in the concrete forms???

J
4 years ago
Hi folks,

I have been developing what I intent to be a base class for several forms that will allow the user for adding / editing / deleteing records. These records could be customers, products, suppliers etc.

I have designed a basic form that has an add, edit and delete button. For the add button, I would want to clear all the values in all of the controls (textboxes, combox etc) in preperation for adding a new record.

My question is this. Is this something I should do in the base class OR should it be handled in the classes that will extend from the base class? Perhaps if the controls were datalinked to the data they will clear themselves (I haven't got that far yet so I dont know). I thought maybe I could write code in the base class that could loop through all of the controls and call this from the extended classes.

Hope this makes sense!

J



4 years ago
HI there,

I went to http://dev.mysql.com/downloads/connector/j/ and downloaded the only option avaiable to me. When I installed it, it ended silently as you say so I had no idea what had happenned.

However, I think I think I have solved it.

I went to the mysql site and downloaded the zip version (under previous versions). I extracted it and found the file that I needed.

I then right click on the project -> Build Path and added the file to the project.

All works as expected now.

Thanks,


J
5 years ago
Hi Folks,

I am trying to run a simple program that connects to a mysql database and prints out some fields. I am using Eclipse.

THe problem I am having is on the following line of code.
Class.forName("com.mysql.jdbc.Driver");

I get an error:
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at mySQLConnect.Connect.main(Connect.java:23)


I have done some research and from what I have found is that I need to alter the class path to pick up the driver.

When I downloaded the .msi I ran it and then the program closed. I have no idea where the files are ???

Can anyone advise on how to locate and import the file so I need to get my program to run?

I have included all the of the source code below.










5 years ago