sasi kala

Ranch Hand
+ Follow
since Dec 17, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
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 sasi kala

Thank You

but the error has occured at rd.forward line

looking forward for your reply
16 years ago
hi

I have used the RequestDispatcher i jsp to forward the request to another jsp,but giving NullPointer Exception

here are those lines:

if(request.getParameter("fromXmlFeed")==null && dataObjects.get("toClintFeed")==null)
{
RequestDispatcher rd = request.getRequestDispatcher("/VBClientFeed.jsp?toQuickQuote=true");
rd.forward(request,response);
}

Waiting for Your Reply

Thank You
16 years ago
thanks for u r response

i have used URL Class

the code will look like this

String url="http://www.xyz.com?name=abc";

URL url = new URL(url);
Object obj= url.getContent();

this will send the requestparameters to the specified url
16 years ago
hi

i have a requirement to send request parammeters to outside Url with out redirecting to that url in java

waiting for u r reply

Thanks in advance
16 years ago
hi john,

you have added "PropertyChangeListener" to the optionpane, so it will call propertyChange() method when you clicked on another button. in my opinion there are two ways to overcome from this problem.

1. insatiate your dialog box and option pane each time when it should display, so that each dialog is new one and each button

2. otherwise, change the optionpane value by your self in propertyChange() method.
example

Hope This Helps.
All The Best
[ June 22, 2005: Message edited by: sasi kala ]
16 years ago
hi Jerry ,
i got the same problem some days back. i tried in several way to get out of it. (try to get listener of splitpane's divider and change the size of left and right component according to the divider position. but i am unable to do that.... ) i got the answer by changing the layout managers of left and right components of split pane.




The right component should keep its existing size
place a panel in right component and its layout should be null.


Hope This Helps
All The Best
[ May 31, 2005: Message edited by: sasi kala ]
17 years ago
Hi bhaskar,
One solution to your problems is use CompoundBorder(from javax.swing.border.*). It allows two borders to one component.

place titleborder as outter border and emptyborder as innerborder.


Hope This Helps
All The Best
[ May 25, 2005: Message edited by: sasi kala ]
17 years ago
hi ranchers,

i have to print a html file which is placed in JEditorPane and i have some code on how to print a html file. but my code needs the number of lines JEditorPane is displaying or height of JEditorPane.


is there any way to get the number of lines displaying in JEditorpane?
or height of the JEditorPane (including total html content)?
if any one know the answer.please help me...........
Thanks in Advace.

Regards,
sasikala
[ May 10, 2005: Message edited by: sasi kala ]
17 years ago
hi Lionel Badiou,

i am also having the same problem. my requirement is to print a html
page which is placed in JEditorPane. By using ur example program i am able
to print my html page.

thank you very much.

but i am unable to specify the number of pages to print.

i have one question regarding this How to count the number of lines in
JEditorPane?
so that i can specify the number of pages to be printed.

Thanks in Advance.

[ April 21, 2005: Message edited by: sasi kala ]
17 years ago
hi,

To set number of columns in the table add this method to DefaultTableModel class

public int getColumnCount()
{
int columnCount = // specify the number u want
return columnCount;
}

Hope This Helps
All The Best
[ April 21, 2005: Message edited by: sasi kala ]
17 years ago
hi,

Place the textarea in a ScrollPane and set line wrap property
jTextArea1.setLineWrap(true);

after appending text to textarea write this line,



Hope This Helps
All The Best
17 years ago
hi,
Here is the code to expand a tree.


Hope This Helps
All The Best
17 years ago
hi,

thanks for the reply. i understand the way how tree works and done some coding to find the solution.

What i understand is "to expand a specific node in the tree, we need to expand all its parent nodes". My problem is, i have object of the node which has to be expanded in hand. and i don't know ancestors of that node.

what i observed in JTree is,
1) we have to store all nodes of a tree in some where (like Map), becasue to search any node the JTree needs only that node object (not even new node object with the same data).

2) row numbers of tree nodes are not static. When we pass a row number to "expandRow(row)" method, suppose n, the tree will expand nth visible node from the root.


i solve my problem like below


And finally i came out of the tree expanding problem.
[ April 27, 2005: Message edited by: sasi kala ]
17 years ago
hi ranchers,

i stuck up with a problem of tree expanding.

i have one tree
root
+ one
+subone
- 1 // leaf node
- 2 // leaf node
+two
+subtwo
- 3 // leaf node
- 4 // leaf node
+three
+subthree
- 5 // leaf node
- 6 // leaf node


My requirement is,
i have to expand the parent of a leaf node in the tree.


Suppose if I pass object of �6�, the tree should expand
subthree� node.


i have tried in several ways to expand the tree
1) expandRow(int) -- expanding the immidiate childes of root only
2) expandPath(TreePath) -- I can't get path of a node. because mutable node have getPath() method, but it returns array of TreeNode[] not a TreePath.

Please help me.

Thanks in advance.
Sasikala.
[ April 19, 2005: Message edited by: sasi kala ]
17 years ago
hi Matt,

i got the same problem in my project and now it is solved. Be sure about removing previous controls and refreshing the panel. (are you adding controls to panel or new panel to frame? )

see this snippet code


Hope This Helps U
All The Best
[ April 07, 2005: Message edited by: sasi kala ]
17 years ago