Help coderanch get a
new server
by contributing to the fundraiser

Satheesh Thekku Veethil

Greenhorn
+ Follow
since Jan 31, 2002
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Satheesh Thekku Veethil

Geeks,
I have a situation here.
I have an application which is made up of two process. Each process displays a JFrame which has user interface components in them.
Now I have an issue in displaying a modal popup. I used a JOptionPane which takes the parent frame as its containter. In which case it is modal with respect to that specific parent frame.
Obviously I cannot make it modal with respect to the second frame (from the second process). So what as a solution is to restrict the motion (the user dragging the popup) to the parent frame only.
Any suggestions as to how I can achieve this?
Any ideas or any other suggestions for getting a modal popup across the two frames??
Please reply asap
Regards
Sat
21 years ago
hi,
I am building java applications which have their main frame as JWindows - version used if 1.4.1_01.
Now here i have problem when i add JTextFields/JTextAreas. These components are not accepting any user inputs - for that matter, they are not detecting any events happening (mouse event or keyboard events).
With jdk1.3.1, the problem was only that the JTextField/JTextArea components were not gaining proper focus.
In the java bug database, they claimt to have closed this issue (bug id 4186928) - they claim the release fixed to be "merlin-beta".
Anyone got any idea what this merlin-beta is?
Do i have any other solution to this problem?
21 years ago
U will have to implement ur own table renderer which returns the JTextArea as the renderer for the particular cell in ur table.
21 years ago
Hello
I have a simple application which has a GUI on a JWindow. I used JWindow because I didn't want the title bar or other decorations to come up.
I want the JWindow to appear on the top left corner (0,0).
However the JWindow appears randomly all over the screen everytime i run the application.
I have used setLocation(0,0) but it doesn't seem to work.
I am running in on Linux with a Gnome desktop running.
Please suggest me a solution.
Thanks
Satheesh
21 years ago
Hi David
Thanks for the reply.
In fact I need to cache those images in memory for certain reasons. one being that these are modifiable by the user and at any time he may want to view it. There are also options of viewing 4-16 images simultaneously on the same screen.
So removing them from memory will be a problem.
But i find it strange that JVM cannot dynamically increase the heap size.
Any ideas?
Sat
21 years ago
Hello
I am developing a Image Viewer Application in Java which can load any number of images. The images are usually 8-9 MB in size. So I run the program with -Xmx option. But the problem is that this limits the number of images that I can load. For exampl with 256M heap size I can load at the most 10-15 images.
Is there something wrong here??
Is it possible to change the heap size of JVM at runtime??
Please suggest.
Sat
21 years ago
Hello
I saw a strange problem with JDK1.4.1 on Linux.
I created a small application which just displays a JPanel. There are no other components on the application.
I ran the application and saw the JVM taking huge amount of memory. It was around 250MB of memory and there were quite a number of threads spawned by JVM.
Any reason as to why this is happening?
Is there any optimization on JVM on Linux that can be done?
Please respond.
Regards
Sat
21 years ago
Hey Chandra
I believe all components have an access method called getText to access the textual information from the component.
So you can user getText() to obtain the text from the text area and then write it into a file.
Sat
21 years ago
Hello
I am trying to come up with a little tool to tag components on a user interface. Here's the strategy I am following:
I take a component and traverse into it and find out the components in it and obtain its name. Thereby associating a tag to the component.
Now I have a little problem in achieving this. I cannot find out if the particular component contains any further components or does it exist by itself.
Let me take an example. Assume a user interface to contain two panels on the root panel. each panel has two buttons and a label. Now at the top level i will have to assume that its a panel and then go into it. In fact if someone just puts a button on the root panel then this strategy would fail.
Does java provide any APIs to access the tree structure of the user interface components. Presently I am aware of getComponentCount which provides the number of components on any container.
Please suggest some hooks if available.
Regards
Sat
21 years ago
Thanks for your response.
I was adding it wrongly. Its working now and with "no funny behavior"
21 years ago
Hello
I have a funny situation.
I have a panel onto which I am putting a JScrollPanel. The JScrollPanel occupies about 70% of the total parent panel and is positioned in the middle of the parent panel.
into the scroll panel i add some light weight components. so basically i have a scrollable control ui.
now when the light weight components are created i find an outline of them in a region outside the scroll panel. in fact the hidden part of the scroll panel shows outline of the components which it contains.
can u tell me whats the reason for this behaviour.
awaiting a quick reply
sat
21 years ago
Hi Nate
Thanks for the quick response. I had earlier tried something similar. But the the drawback it has is the fact that one split is right across the screen from top to bottom and the other is half on the right and half on the left.
The fact being that it still doesn't allow an individual resizing.
I hope u got my point.
Regards
Sat
21 years ago
Hello Geeks,
I am currently working on an application which needs to have a customizable display area. Consider the display area to have four ports as shown below: _ _
|_|_|
|_|_|
Now each of the ports shud be resizable by dragging a mouse on any of the vertical/horiztonal lines. So any of the ports can be resized by dragging its boundary and once done, the other ports would resize and rearrange themselves.
Any ideas as to how I can accomplish this in Java?
Awaiting a quick reply.
Regards
Sat
21 years ago
Hi Ashish
I tried ur suggestion. But it doesn't work.
Here's the code of the test program that i tried.
See if there is something i am missing
Thanks
Sat

import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class TooltipTest
{
JFrame frame;
JPanel panel;
JButton button1;
JButton button2;
TooltipTest()
{
frame = new JFrame();
panel = new JPanel();
button1 = new JButton("THIS IS TEST BUTTON1")
button2 = new JButton("THIS IS TEST BUTTON2");
button1.setToolTipText("This is a text tool tip for button 2");
button2.setToolTipText("This is a text tool tip for button 2");
ToolTipManager.sharedInstance.setEnabled(false);
button1.addMouseListener(new MouseAdapter()
{
public void mousePressed(MouseEvent event)
{
System.out.println("Inside Mouse Pressed");
ToolTipManager.sharedInstance.setEnabled(true);
}
public void mouseReleased(MouseEvent event)
{
System.out.println("Inside Mouse Released"); ToolTipManager.sharedInstance.setEnabled(true);
}
});
panel.setLayout(new FlowLayout());
panel.add(button1);
panel.add(button2);
frame.getContentPane().add(panel);
frame.pack();
frame.setVisible(true);
}
public static void main(String args[])
{
TooltipTest t = new TooltipTest();
}
}
21 years ago
Hello
I am trying to write an application with tooltip feature on some of the components.
Now by default the tooltip comes up when there is a mouse over on the component. I want to change this aspect and get the tooltip on a mouse pressed event on the component. In fact when the user keeps the mouse pressed for a stipulated time, the tooltip is shown.
Any ideas on how I can accomplish this feature?
Please respond at the earliest.
Thanks
Sat
21 years ago