Francisco A Guimaraes

Ranch Hand
+ Follow
since Mar 20, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Francisco A Guimaraes

I just found out that when you create an OutputStream on a locked file, it will erase the content of the file. This is already registered in the Java bug list.

Is there another way to lock a file?
19 years ago
Hi everybody, I'm having a problem with drawing a "window" inside a JPanel.

This "window" will have a header and a body. The problem is that on the header, there is a space of a couple pixels unused so the header doesn't stay aligned with the body. The header is a JPanel with GridLayout, the "window" uses a BorderLayout and the frame uses a null layout. Below is the test code I wrote.If you run it, you'll see that there's a minimal yellow line after the magenta border, that's the background color, so the panel isn't using all the space. Can anyone help on this?

Francisco


[ October 14, 2004: Message edited by: Francisco A Guimaraes ]
20 years ago
here's a possible solution:
  • Create a JPanel with all the input components you need
  • Use the showOptionDialog method and use the JPanel you created as the message


  • When you receive the result, you can get the values of each component individually.
    Like this:

    Just one detail, since all those components are the "message", none of them will start with focus.
    Hope it helps.
    Francisco
    20 years ago
    is there any way to use i18n with an JFileChooser? I am writing an application in portuguese, I�ve set the default locale to pt_BR, but the file chooser still appears in english. I saw that I can change the title and the "accept" button, but the rest remains in english, does anyone have any ideas?
    Francisco
    [ March 22, 2004: Message edited by: Francisco A Guimaraes ]
    20 years ago
    In this case "they" are Sun, because I was using the jdbc-Odbc driver provided by sun. Some might say that it is not a "commercial" driver, but I honestly think that�s no excuse for a lousy job; a NullPointerException doesn�t help anyone. I lost a couple of hours to discover the problem and it could have been easily avoided.
    Francisco
    21 years ago
    After some hours, I discovered what was wrong: when you create a Statment with the default method it is forward-only and read-only, and for you to be able to update the columns in the result set it must be scrollable and updatable. Two arguments that you must pass when getting the Statement. All this trouble could easily be avoided if instead of NullPointerException, they throwed a SQLException with the message "Trying to update a read-only resultSet", or something like that, don�t you all think?
    Francisco
    21 years ago
    Hi, I�m trying to update a column, but when the updateString method is executed, I get a NullPointerException, does anybody knows what�s going on? I�m not mispelling the column, it *is* a String and if I do a getString() I get the current value correctly. Any help is greatly appreciated.
    Francisco
    21 years ago
    Hi, everybody. I have the following problem: I need to convert a number into text, e.g., if I get '1' I want to convert it to 'One'. Anyone knows if there is a java program that does it? Any help is deeply appreciated.
    Thanks,
    Francisco
    21 years ago
    does anyone know if there�s a junit extension, like cactus, to work with functional tests?
    Francisco
    ps. Another reaon for this post is that I really would like to have the "JUnit in action" book.
    21 years ago
    Hi, I really could use this book since I�m developing a visual design pllugin for my course.
    Francisco
    I want that book! I would really help me out.
    Francisco
    Hi I would like to know if it�s possible for you guys to provide a toc for the book.
    Francisco
    Hi...I will start to write a plugin for Eclipse using GEF to make a GUI editor with a friend of mine. Does anyone knows a good article/tutorial/example for GEF development?
    ps. I would really like to win the book, I could really use it.
    Francisco
    Hi, just a doubt: do you have to manually define that reference "comp/env/ejb/CabinHomeLocal"? I�m using Websphere Studio 5 from IBM, can you help me?
    Francisco
    Hi, I just wanted to let you people know that I made an HTML version of Ashik�s Notes on the SCBCD. Here�s the address:
    http://www.geocities.com/francisco_guimaraes/ashik
    I know this is a bit of blatant advertising, but I think everyone would like to know you don�t have to pay a fortune to read the notes...there�s also notes on SCPJ2 and SCWCD.
    Francisco