Fandy Akhmad

Ranch Hand
+ Follow
since Nov 26, 2011
Fandy likes ...
MySQL Database Java Linux
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Fandy Akhmad

Campbell Ritchie wrote:Have you tried double buffering? You set that by passing true to one of the overloaded constructors of (I think) the JPanel class.

Hello, i am new to hear double buffering. Do you have any reference?
Thank you, ^^
11 years ago
Hello, i have problem image flickering in JPanel with ScrollPane

I add image from specified folder to display in JPanel with ScrollPane.
And in each image i add actionListener, when the user click the image, it have preview.

When i scroll down the Jpanel, and i try to preview the image, JPanel has flicker.
This is the preview,

How to handle that?

And this my ImageViewer (JFrame)

Please help me.
Thanks before.
11 years ago
Hello i have application that read data from properties file and put it in HashMap. This is for report data in jasper report.

I have 2 .properties files that hold the data for each report.
When I read the file and put it into Hashmap properties it is error, the data is truncated and not all legible. So It only generate 1 report the whole report, and for the second report its data was empty.
But when there is only 1 .properties file , the data completely generated.

I think i was wrong in my HashMap or properties file, i very confused on it.

Here's my code:

Please help,: (

Richard Tookey wrote:I don't understand your question! You already are handling the events! What problem with this are you experiencing?

You should note that many USB to RS232 adaptors do not provide true RS232 signal levels and may not work with devices that do need proper RS232 signal levels. Also, you need to establish the pedal parameters such as baud rate, number of stop bits, parity and handshaking method. If , as I suspect, you don't have a data sheet for the pedal then you can determine the parameters using an oscilloscope.

I am new in serial programming in Java.
I try that code, but if i click foot pedal, it not do anything.

Thank you
11 years ago
I have foot pedal from endoscopy medical machine. And it use RS232 serial port. And i connected using USB Serial Controller. I found library RXTX that handle serial port.

I already try the sample code from RXTX wiki, like this :

But i wonder, how to handle event listener, when foot pedal is touched/clicked?

Please help me, thanks before
11 years ago

Maneesh Godbole wrote:To remove use Container#remove(Component child)
To add use Container#add(Component child)
You will need to also call revalidate as well as repaint to ensure the UI refreshes after any add/remove operation.

Instead of adding/removing panels, you might also want to considering refreshing the image or using a CardLayout

Because my data will be large, it's a patient data in Hospital Information System. Impossible to use CardLayout i think.
11 years ago
Hello, master
I made a dynamic JPanel to hold the picture, where the picture came from the selected user ID in the JTable.

For example: When I select ID 1 in the JTable, it will come out images A, B and C. But when I select ID 2 in JTable, that comes out is a picture of D, E and F
I made ​​it using a loop to make the JPanels that contain images A, B, C and so on.

The problem is, when I select ID 1 it display A, B and C image and create a JPanel object A, B and C or whatever java sequence object name. When I chose ID 2 it shows D, E and F and JPanel objects D, E and F are created, I would like object A, B and C is removed / replaced / destroyed. So that the view in Application does not increase the number of JPanels but replacing the previous created JPanel.

This is the code that I created to display the dynamic JPanel :

Please help me, Thank you
11 years ago
Hello, sorry if out of forum category.
I just wonder how to create our own report designer? What specification that i need? and any reference about that?

Thank you.
11 years ago

Matthew Brown wrote:Java doesn't really have multi-dimensional arrays. Instead, what it has is arrays-of-arrays. Given that, does that number make sense now?

Yes, of course Java builds multi-dimensional arrays from many one-dimensional arrays.
Just now, i get some reference , it says :

This actually allocates 6 objects: a one-dimensional array of 5 elements for each of the rows, and a one-dimensional array of ten elements, with each element pointing to the appropriate row array.
This case for array :

It is correct?

I am sorry for my bad english.
Thank you.
11 years ago
I am not sure, honestly i don't know.
Once i think 3*9 = 12 is number of object, but i am wrong. It's number of element.

In my book that i read, it has 4(1+3) object.
I confused . Please explain to me.

Thank you for your response.

Darryl Burke wrote:You first. How many do you think?

11 years ago
Okay thanks you Mark, very clear explanation.
11 years ago
Hay all master, i am confused about array mutidimensional.
I wonder, how many object can construct for this array?

Thank you
11 years ago
Hello, master

I am new in Spring Framework. For now i learn about Constructor Injection.
But i have one question.

How i can set constructor value not in XML configuration?

Because in my book that i've read it set constructor value in XML with this code :

Thanks before
11 years ago

Winston Gutkowski wrote:

Fandy Akhmad wrote:If print out in the method [getNilai()]
I get null value.
If i print out in the current method: [setData(String[] data)]
I get the value that i wanted.

OK, so why do you think that is?

Hint: What are you doing differently?


PS: Please don't use bolding unless you really need to. See our KeepItDown (←click) page for details.

Oh i am sorry for that, i just use for make detail.

I already, make any change :
- make array and getter and setter. in setter i passing that value. But it just return null value.

and in code above is my last step. I am stuck in there.
I just want to pass data from another JInternalFrame to another JInternalFrame. Usually try to pass from JFrame to another JFrame, its OK because it have main method that directly executed.

Thank you.
11 years ago

Campbell Ritchie wrote:I cannot see what is going wrong in that code. Please tell us what printouts you get from that setData method.
Your getNilai method is incorrectly named, because a getXXX method should return the field (or a copy of it).

Thank you for your response.

If print out in the method :

I get null value.

If i print out in the current method :

I get the value that i wanted.
11 years ago