Sandhya Rprasad

Greenhorn
+ Follow
since Mar 01, 2001
Merit badge: grant badges
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 Sandhya Rprasad

Hi I have a bean and I've added the bean to the Visual Cafe component library which means that I can drag and drop the bean like any other swing components such as buttons, labels etc. So, when I specify the properties of the bean in the property list, the bean should resize accordingly.But, when I try this, the bean is showing up with its original size. I've called the ComponentResized callback for the bean to do the resizing. But, still not working. I'd like to know the procedural approach for this. Could somebody guide me with this ?!!
21 years ago
Try this link. The previous one was'nt addressed properly, I'm sorry about that !!
http://www2.gol.com/users/tame/swing/examples/SwingExamples.html
Sandhya
21 years ago
Hi Anagha
try this link. It has got some really good code and eg. on JTables. Hope this helps with your problem.
www2.gol.com/users/tame/swing/examples/JTableexamples.html
Good Luck
Sandhya
21 years ago

Originally posted by eric moon:
Well, Sandhya, instead of complaining, how about answering your own question when you figure it out, so others don't spend their time and energy answering it.
That's what I do. After all, we don't pay to use JavaRanch!


Hi Eric
It was not a complain, but it was a suggestion. I'm sorry if you could'nt get to the sensitivity of the solution. If you did observe, I did thank Deekasha for the response which I certainly mean. Ofcourse I am aware that we don't pay JavaRanch to use it and yes, I did find the solution after a lot of struggle and research over the net and stuff. Yes, if the solution given to me did'nt help me much in time, which I'm not blaming, it may help someone else coming up with similar problems in the future.
So, please do put your words after giving it a serious thought when you're posting on such forums .. I'd really appreciate that !!!
Sandhya

21 years ago

Originally posted by Asaf Karass:
yes, I'm adding it to a JFrame.
where to put the the code where I set it to invisible?
thank you,
Asaf.


You need to add the code in the button's action performed event i.e when you double click on the button you'll get all possible callbacks for the button. you need to put the code there.
Sandhya
21 years ago
Hi people,
I'm a starter to this topic. First off all,
1. How do I start with the concept of cookies ?!!
2. What are the basic requirements to write cookies ?!
3. Could you please suggest me where I can find some basic guidance to start off with cookies ?!!
Thanks
Sandhya
21 years ago

Originally posted by David Freels:
Try adding the JTable to an JPanel and then add the JPanel to your JScrollPane.
David


Thanks David
I tried your soln, but it did'nt work for me.I solved the problem, basically, I was trying to instantiate the Scrollbar policy twice which was turning into a weird screen. All I had to do was to remove that line which I'd forced in the init() method. Thanks again.
Sandhya
21 years ago
Hi I have a bean and I've added the bean to the Visual Cafe component library which means that I can drag and drop the bean like any other swing components such as buttons, labels etc. So, when I specify the properties of the bean in the property list, the bean should resize accordingly.But, when I try this, the bean is showing up with its original size. I've called the ComponentResized callback for the bean to do the resizing. But, still not working. I'd like to know the procedural approach for this. Could somebody guide me with this ?!!
21 years ago
Okay people, I found the flaw with the scrollpane. I did'nt have to specify the scrollbar policy which I had forced in the Init() method of the bean which was why my scrollbars were appearing weird on the screen. Other than this correction, nothing else was required.
Sandhya
21 years ago
Hi
My GUI comprises of the following :
JAPplet => Bean =>( JScrollPane => JTable and some buttons)
I'm loading the table with some data . It has 4 columns and n rows with the rows increasing by the data loaded. I've made the last 2 columns hidden. Now, when I'm trying to add the data, my JTable is growing in size without the scrollpane appearing . This is covering up the buttons inside the bean since the JTable's size is >sing. Could somebody suggest me with a solution.I'd really appreciate a faster response.Is this problem due to the hiding of columns ?!! Should I remove those 2 columns?!!
Thanks
sandhya

21 years ago
HI Rob, Thanks for the response but the scrollpane becomes very small and still does'nt make the scrollbar appear. Okay, the problem is the last 2 columns are hidden(there are 4 columns).
So, what's happening is when I make the size of the bean small, instead of the vertical scrollbar appearing, a horizontal scrollbar sort appears on the vertical side of the scrollpane. Also the table is covering up the rest components of the bean. I guess this is a little weird to explain, but I've tried to be clear .. I hope. So, if you come up with some ideas, do let me know.
Thanks
Sandhya
21 years ago
Hi preethi
Its good to be good at basics before you step into something furthur. If you have a knowledge as to write code for applets, it would be really easy to understand how swing concepts work. However, if you know the basic stuff and you're a fast learner, I guess it should'nt be a problem.
For links, there's nothing to beat java.sun.com, search for JFC swing tutorials. Books => OReilly, JFC Swings by Satyaraj Pantham is really good.
Hope this helps you.
Sandhya
21 years ago
Hi Ganashree,
Try setting the layout for the panel to Grid Layout once you've put the panel inside the scrollpane. Try adding some buttons so that the alignment takes place such that the scrollbar appears once the buttons nos. exceeds the scrollpane view.
21 years ago
I'm sorry. Let me continue with the solution. First, when you add the label to the container(frame, a panel etc) set the visible property of the label to false. Then in the actionperformed event of the button set the label's visible property to true.
good luck
21 years ago
You need to add a Callback to the button asking it to display the label when the button is clicked i.e you may add an actionlistener to the button.
21 years ago