shansi raj

+ Follow
since Jul 05, 2006
Merit badge: grant badges
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 shansi raj

Also please let me know how do i handle the help window close event?
13 years ago
I need a help in integrating the Java Help. I had done that using Helpset in my application.But the problem is if I close the help window the preferences gets persisted.I need to close my application and launch it again. I have a secondary popup for some texts in the html file which gets persisted even if the help window is closed and reopened.Can anyone help on this?
13 years ago
I have a custom cell Editor which works fine on double click.It has a textfield and a button as the column,the button becomes enabled on double click and textfield in editing mode.But my requirement is when I select a row in the JTable,only the button should be visible but the textfield should remain uneditable.Only on double click it should be enabled.

13 years ago
I tried that but its not working...
14 years ago
Can anyone please tell how to define the JEditorPane's text color?
14 years ago
Thanks!I used JOptionPane and it worked.Am using GridbagLayout.

for (int i = 0; i < 10; i++) {

jTextField[i].setMinimumSize(new java.awt.Dimension(250, 20));
jTextField[i].setPreferredSize(new java.awt.Dimension(250, 20));
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = gridx + 2;
gridBagConstraints.gridy = gridy;
gridBagConstraints.insets = new java.awt.Insets(0, 0, bottom, right);
jPanel1.add(jTextField[i], gridBagConstraints);

14 years ago
I want to set the size of the JDialog based on the number of components which I get only at runtime.Can anyone please tell me how to set the size of the JDialog dynamically?

Also I have a JTextfield and buttons in my dialog and when I resize the dialog only the window becomes bigger but not the components?How to achieve the same?

Thanks in advance
14 years ago
Can someone tell how to zoom an image?
16 years ago

My application is a netbeans plugin applciation. I have a problem mapping my properties dialog and netbeans properties dialog. When I right click on my component and select Properties, my dialog opens, but the same set of properties should be displayed in the Properties Window of netbeans.

Can anyone help me out? The following code is placed in

public Sheet createSheet(){

Sheet sheet = super.createSheet();
Sheet.Set set = sheet.createPropertiesSet();


Node.Property[] typeProperties = new Node.Property[properties.size()];
set.put((Node.Property[]) properties.toArray(typeProperties));
return sheet;

Even I have come across the same problem and I resolved it by making the frame size bigger and the length between the components is more ie... use gridbag layout and the length between the JLabel and Jtextfield should be more.Then it gets adjusted and the text of the label is displayed fully.
16 years ago
Use gridbag layout. i tried just now...its working fine
16 years ago
Im afraid whether i could understand ur question properly. But anyways it seems that you need a alert msg displayed if the second column is empty.
Have a mouse released or mouse pressed function and then check whether the 2nd column is empty and alert a msg. Also remove the setPreferredWidth and place it outside the loop.
16 years ago
Call this method before appending any text to the area.

textArea.setText("Some text");
16 years ago
Try doing this

tabpan = new javax.swing.JTabbedPane();
tabpan2 = new javax.swing.JTabbedPane();
panCoupling = new javax.swing.JPanel();
scrollPane = new javax.swing.JScrollPane();
textArea = new javax.swing.JTextArea();

setLayout(new java.awt.BorderLayout());

scrollPane.setPreferredSize(new java.awt.Dimension(200, 200));


tabpan2.addTab("CBO", panCoupling);

tabpan.addTab("tab1", tabpan2);

add(tabpan, java.awt.BorderLayout.CENTER);
16 years ago