aulo aasmaa

Greenhorn
+ Follow
since Aug 06, 2001
Merit badge: grant badges
For More
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 aulo aasmaa

Hi,
I have a JSP page showing some information. I would now like to include a new functionality with it that would allow me to fax the page when a specific button is pressed. I have already done a method for printing a SWING table in my Java desktop, I think faxing a JSP page could be handled very similarly to this, yet I haven't figured out how.

Any good references and help welcome!
OK!
AUlo
22 years ago
The solution I got from forums.java.sun.com:
(by anders.hedstrom )
22 years ago
OK, found a way to handle the problem, but a new one appeared right away.
The following code transforms 1'000.00 to 1 000.00, but this
is no good. I would like to get rid of the space as well, but I cannot declare the "newchar" as ''

How do I remove the space?
22 years ago
Background:
I have a JTable (the problem is not in swing), where I have some columns of numbers. All numbers are formatted, so that 1000 becomes 1 000.00 or 1'000.00 and 12.1 becomes 12.10
Problem:
One of my processes understands the decimal places, but gives an error to the apostrophes (') and spaces.
Question:
How do I replace these characters with nothing? I mean How do I get from 1'000.00 to 1000.00, the decimal places remain, I only need to get rid of the bad characters.
Code

Tnx!
[This message has been edited by aulo aasmaa (edited August 15, 2001).]
22 years ago
This should be simple:
I use a JTabbedPane in my application. On one tab I have everything correctly laid out (tables, lables, ...). The other
tab is currently empty.
I would now like to get a JPanel from a different application to this second tab.
This should be easy by importing necessary class files and then pointing to the JPanel.
Like this:

where "myPanel" is located in a different application in a different directory on my PC.
How to get it done?
I can also post the whole code here if necessary.
OK!
AUlo
22 years ago
I now know the reason:
The JLable text is updated right after I press the arrow keys, but the "cursor" is moved after that, ie I have to move to
ListSelectionEvent listener.
OK!
AUlo
22 years ago
Background:

JTable with many rows. When user scrolls then the current row number should be displayed on one JLabel.
Problem:
I have other parts ready, but I don't know how to listen to the JTable.
Current idea that doesn't work:

Would be wery delighted if smb could point out the bug in this code.
[This message has been edited by aulo aasmaa (edited August 09, 2001).]
22 years ago
Tnx, I have all the system keys in front of me:

The system kept counting with GMT as long as I made the default locale to GMT+2. It works fine now and all dates are displayed correctly in my JTable.
Tnx to everybody!
OK!
AUlo
22 years ago

returns me the GMT time, even though I am located in GMT+2.
If my desktop clock shows 8:58, then the previous statement prints out 6:58.
Now where does this bug hide?
OK!
AUlo
22 years ago
Where does the bug hide in here?


The error I get:
no method get(int) found. I need to use an Object instead of Int, how?

(edited by Cindy to put spaces after < so it wouldn't act as an html tag)
[This message has been edited by Cindy Glass (edited August 06, 2001).]
I editted the code to be multiple lines. With it all on just 2 lines, it was pushing things off the side of the page.--Carl
[This message has been edited by Carl Trusiak (edited August 06, 2001).]
22 years ago

Originally posted by Sunetra Saha:
If you just want to retrieve values by their indices, why use hashtables at all? Why not Vectors or ArrayList?


Right, I first had a false idea that Hashtables only store unique values. And it did seem to work. I could move to any other option, as soon as I work out the magic to store only the unique values.

I already have an idea about how to get it done. A string array would actually suit my needs the best.
OK!
AUlo
22 years ago
Ok, the "uniqueness" only worked as long as I modified the to
I now need to implement a magic to get only the unique values into the Hashtable.
OK!
AUlo
22 years ago
And here is the code I use to populate the Hashtable. What do I need to modify here in order to get the previous code fragment work?

OK!
AUlo
22 years ago
Tnx for a very helpful explanation . I have now modified my code so that if the following idea would work, it would also solve my problem.

[This message has been edited by aulo aasmaa (edited August 06, 2001).]
22 years ago
How to retrieve Hashtable elements by index, I mean that I store some dates in a hashtable, and in another place I'd like to get the first and the 3rd element from the hashtable. The dates come from a database, so I don't know them beforehand.
OK!
AUlo
22 years ago