Anu Bhagat

Ranch Hand
+ Follow
since Jun 20, 2008
Merit badge: grant badges
For More
Bay Area California
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
2
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Anu Bhagat

I am trying to make a decision for data transfer appraoch in a java application.
I am not sure if I should use JSON or XML.
Any comments will be useful.

Thanks in advance.

Anu Bhagat
11 years ago
Please give any pointer hint that will help me to hilight the current line with different color than all the previously visited lines.

Thanks in advance Here is my java class

Anu




11 years ago
I can highlight visited lines in one color. I want to highlight previously visited lines with gray and the current line with yellow.
My code is as follows. With this all visted lines are highlighted with yellow. When step button is clicked the actionPerformed method is invoked.

Please help Thanks in advance.

Anu



11 years ago
setVisible(false) and dispose() dit it. Sorry to bother.

Thanks any way...

Anu
11 years ago
I have implemented a JOptionPane confirm dialog with YES NO option with the code below
int result = JOptionPane.showConfirmDialog((Component) null,
"Do you really want to quit?",
"alert", JOptionPane.YES_NO_OPTION);

I can get the user response with the code below
if (result == JOptionPane.YES_OPTION) {
System.out.println(" you selected YES option");}

I want to close the parent window when user selects YES_OPTION.

How can I do this?

Thanks in advance.

Anu

11 years ago
Hi Michael,

Thanks much. This is exactly what I wanted to do.

Regards,

Anu Bhagat




Michael Dunn wrote:> I want to hilight certain line when mouse os on that line in the TextArea.

by mouse on that line, if you mean the caret i.e. click the line, the line is highlighted
something like this perhaps, or look up the Highlighter class

(easier to show it, than try to explain it)

11 years ago
Thanks for the response.
I can get text in textarea by following line of code

String taContains = myTextArea.getText();

taContains string contains text with new lines.

I want to hilight certain line when mouse os on that line in the TextArea. How to achieve this? Thanks

Anu
11 years ago
I want to step through the text in JTextArea.
I can display text from a file using JFileChooser, and I can save the contents of text in JTextArea to a file.

I need to know hot to step trhough the text in JtextArea. Please any pointer, code sample will be greatly appreciated.

Thanks.

Anu
11 years ago
I solved it. It was a simple oversight on my part. Thanks for listening to me.

Anu
12 years ago
I am stuck on the repaint issue.

Here is the description of the problem

I have a myFrame which extends from JFrame,
I have myPanel (JPanel) and I add this to myFrame,

I then make few components and add them to myPanel

I move these components around in myPanel.. now I set a new size of myPanel.

I repaint myPanel. My components appear fine but myPanel does not resize to the new size that I set above.

This is done in a large application so I don not have code to provide.

I am really stuck on this problem, and would deeply appreciate any help.

Thanks in advance..

Anu
12 years ago
I am new to javaFx. I have build my first hello world JavaFx Application. still trying to understand what are the benefits of using JavaFX? Can we add JavaFX GUI to existing Swing GUI? Can we Use JavaFx GUI from Java code?

Are there any good web sites, books, that will help some one to get started and understand it well? may be something like Head First series....

Thanks.

Anu Bhagat
14 years ago
Andrew,

Actually I tried to send you an email regarding the error today at
scjd@apress.com (To contact the authors this is the address mentioned in the book ), and my email did not make it. i got delivery failed due to incorrect address.

I was going to contact you through this forum about this error, but then I found this post on the forum, which helped me to solve the issue.


The book still has the same error on Page 309. I was able to run the client in the networked mode only after I found this post.

Thanks for the post.

Anu Bhagat