Michael Paul

Greenhorn
+ Follow
since Mar 29, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Michael Paul

Sorry I didn't mean to start a new thread, my apologies.
11 years ago
Thank for all of your advice! it was very helpful!

Michael
11 years ago
Hey,

I am making a system call to open a particular file in ms word. I do it like this:



The problem here is that I do not believe that this exe file doesn't appear in the same path on all computers...I would assume. So how can I generally make a system call that says, look for microsoft word or some flavor? I have it working for the case in which I know where the exe file.

Thanks
Michael
11 years ago
I have a class that extends JPanel and then another class calls this and set it to visible and all of that...but instead of getting an image i am just getting a JFrame with nothing in it...So I was wondering if there was something I am doing wrong in my code here:




Any help would be very appreciated..
Michael
11 years ago
I have a file chooser and I want to take the selected file, and turn it into a Blob so I can store it in a MySQL DB... Does anyone have any advice?

Note: I did look around previous forums and didn't find anythign quite liek this.

Here is a code snippit:



Thanks,
Michael
[ May 03, 2008: Message edited by: Scott Selikoff ]
Thanks for the response! I am not new to java, just to GridBagLayout...I usually work my way around having to use it. However, I understand that it is the most powerful layout manager, so I figure I should get comfortable with it.

You had mentioned just putting the JLabel next to the textfield...I do have that. This problem isn't really a "practical" one, it is just because I noticed this happens, and I was curious if there was a common solution to it. Maybe a more practical example of having to do this would be if you were asking the user to enter the version of something and you had a default value int he textfield explaining the format for the version...such as "#.##.##" or something of that sort.
11 years ago
Hey,

I am using GridBagLayout and I have a couple of JTextFields. I want to make them all the same width however, some of the JTextFields have text in them such as "Enter UserID" or something of that sort. So when I set the ipadx value, it seems to just add on to the width of the text inside the field. The problem with that, is that I don't want to have to figure out how long each each string is in order to make all the fields the same width. I could do that fo rthis small example but I was wondering what the best practice is. I'm sure there is an easy way around this...Does anyone know it? Sorry if this is a Noob question.

Thanks,
Michael
11 years ago
Thank you very much. It is sad that half the time when I post issues they are things that I knew I had to do...Just for some reason did not realize that I did not do those certain things...The manifest file was missing the space at the end. I appreciate your help!

Michael
11 years ago
For somereason when I run the Jar file that I just created, it cannot find the mysql connector...which i put on my desktop and renamed to mysql.jar...

This is what my manifest file looks like:



Anyone have any idea why this won't work? I am at a loss...
thanks in advance
11 years ago
Thank you very much, sometimes I shock myself with how I overlook small things! I new that you had to do rs.next() and for some reason refused to think of that...Thank you very much for your help!

Michael
Hi,

I am trying to just get the value of a column in a DB that stores an int. The value is not null. I have tried both using a column name and index number and with both I get a SQLException error. This is the code:



The line I am getting the error on is:




Anyone have an idea as to why this would be happening? All help would be appreciated.
Hi Ranchers,

I made a JFileChooser, so that you can select only textual documents, and then I want to be able to save this to a database but I really have no idea of where to start with BLOBs can someone give me a little starting push with this topic...I read examples online about how to retrieve BLOBS which seemed very easy...I am jsut not sure how to save a document as a BLOB to begin with..this is the code for my filechooser incase you wanted to see it:



Just so you know, I do know how to write to the DB, I just don't know how to handle BLOBs. Any help at all would be appreciated, =)

Thanks,
Michael
[ April 23, 2008: Message edited by: Michael Paul ]
I did a printStackTrace, and it said I couldn't use "executeQuery" to manipulate data. So I used executeUpdate and it worked, thanks for reminding me to do a printstacktrace, i was being dumb, thanks again!

Michael
[ April 16, 2008: Message edited by: Michael Paul ]
Hi,

I am trying to write to a DB from my code however the data is not writing to the database. I ran the SQL statement through the DB Frontend that I use and it worked, however through my code it does not work. Here is the snippit:




Any help at all would be appreciated, I am very stumped,

Atreides