deekasha gunwant

Ranch Hand
+ Follow
since May 06, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by deekasha gunwant

Hi Pradeep,
Why don't you put the image in a JLable
JLabel lbl = new JLabel(new ImageIcon("....."));

regards
deekasha
23 years ago
Hi Nuzhar ,
It's no trick.swing supports it and we use it.Otherwise u can't have multiline labels.

regards
deeksha
23 years ago
Hi Daniel,
You need to add following two lines to your code after u add new JPanel to it.

here fr is the container to which you are adding /removing panels

hope this helps.
regards
deeksha


23 years ago
Hi Kajol,
Yes you are right.
1) You have added a Panel P1 to your applet.
2) Layout of P1 is set to Card Layout.
3) Now You need another panel P2 .
4) set the layout of P2 whatever you want.
5) add your components (Buttons etc)to P2.
6) add P2 to P1.
and everything is done.
hope this helps.
I'm in hurry right now so can't give you working example.
regards
deekasha

regards
deekasha
23 years ago
Hi hemlatha,
You shall use Window instead of Frame. Window by default does not have any maximize/minimize/close buttons.
hope this helps.
regards
deekasha

23 years ago
Hi Kajol,
Yes you can use CardLayout in Panel or in Frame.
and you can have panels inside your frame or inside other panel.
hope this helps,
regards
deekasha
23 years ago
Hi bapi,

If ur browser do not support swing and u still want to use swing in your application .then the only way out the plugin.

and for this u need to get HTMLConverter(from sun's site ) and convert your HTML using .

Once converted the page will automatically try to download the plugin when accessed first time.
but remember that plugin takes quite a significant amount of time to download and when the user will try to access your application from slow internet ........ it will not be very pleasing for him/her.
so do think about the plugin download time before you decide in favour of swing.

regards
deekasha

23 years ago
Hi Nuzhar,
In swing you can have multiline label by using html tags.
for example...

and since it supports html so u can make use of other html tags.
regards
deekasha
[This message has been edited by deekasha gunwant (edited March 04, 2001).]
[This message has been edited by deekasha gunwant (edited March 04, 2001).]
[This message has been edited by deekasha gunwant (edited March 04, 2001).]
23 years ago
Hi sandhya,
to make few rows editable u need to override boolean isCellEditable(int row,int column) method of JTable class.


actually whenever you try to edit some cell then the method isCellEditable() is fired for that row,col pair. so u can override this method to return true/false depending on whatever conditions u have.
hope that was clear.
regards
deekasha


regards
deekasha
23 years ago
Ryan
you are absolutely correct.
regards
deekasha
23 years ago
Hi Mike,

the problem is not with setMnemonic() instead u r trying to navigate in a wrong manner.
To go to Edit->Find menu u should use
Alt+E followed by just F (not Alt+F).

regards
deeksha
23 years ago
hi Vishnu,
Why do u need to close the applet? in fact applet are supposed to be closed when the browser window containing them is closed by the user.System.exit() does not work with applet.


regards
deeksha
23 years ago
hi all,
i want to find out the number of rows in a result set before proceesing it.
i used getFetchSize() for this but this method is returning 1 always.
i want to know what is the significance of this method and is there any method in jdbc 2.0 to find out the number of rows in a resultset.
regards
deeksha
hi swati,
i'd answer few of your queries.
Q1)
You need to create a class that will store a unique object elements. You do not need to sort these elements but they must be unique.
What interface might be most suitable to meet this need?
1)Set
2)List
3)Map
4)Vector
ans:1)
what not 3) Map to store unique object elements, and Map is unordered.
This question is from appliedreasoning applet


Map stores a pair i.e. a key and a value. so map can not be the right answer.
--------------------------------------------------------
Q2)Do event adapter classes provide a default behaviour?
No they don't. they just provide an empty body to all the functions of an interface.
--------------------------------------------------------
Q3)
<code>
public class Demo
{
public static void main(String args[])
{
Demo d = new Demo();
call().run();
}
public static Demo call()
{
return null;
}
public static run()
{
System.out.println("Run");
}
}
</code>
output => Run
I though it causes a NullpointerException

in case of static methods even if the reference is null no null pointer exception is thrown . had it been an instance method it would haveresulted in NullPointerException..
----------------------------------------------------------
Q4)
Overridding method cannot throw exception which is not thrown in overridden method.(True or false)
ans = true


yes it is true.
just think that if the overriding method can throw more checked exceptions when the bold line gets executed then u can get a compile exception at runtime.which certainly can not be accepted.
------------------------------------------
Q5)
byte b;
double d =417.35;
b=(byte)d;
System.out.println(b);
output is 95
but how to convert a double value into byte type?

here only the 8 least significant bits will be taken into account and it seems that the 8 lsb have value equal to 95.

regards
deeksha
hi barry,
just write pause in the next line of java command.that will keep the window open.
regards
deeksha

23 years ago