|
How to extract only the public key from any digital certificate???
I am writing an email client which sends encrypted emails in java....
|
|
|
|
|
Hi All,
I need an insight on how Java handles events like basic click events.
I know how it is done but, just wanted to know the process in detail, like what class hierarchy is followed while handling events. How the event classes like ActionEvent get the information about the source, how the event occurence is multicasted among different registered event listeners.
I tried to find this detail in books but wasn't successful and invested good amount of time for it.
Your help is welcome with thanks.
|
|
|
|
|
Zealous_Me wrote: I tried to find this detail in books but wasn't successful and invested good amount of time for it.
Did you ask Dr Intarweb?
A quick google for 'ActionEvent javadoc' found this[^] in the first reply.
Every, and I do mean EVERY, class in java has a javadoc. Maybe you haven't generated all your own, but ALL the shipped API objects have a javadoc ready and waiting. It is your friend and will tell you what you want to know. javadoc likes being asked questions.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Hi, I tried with javadoc also and I do have all the APIs and their documentation. But, still the mechanism isn't described anywhere. Probing into every API and finding out its connection with every other interface and class directly or indirectly associated is a very long and time taking business.
Thats why I tried to sought an answer on this forum.
Nevertheless your response is still welcome.
Thank you.
|
|
|
|
|
plz any body tell me how i write this expression in java'
C and B are int type of arrayand X is polynomial
X(i)<-X(i)+B().X(N-m is power of X)
|
|
|
|
|
You don't just need help, you need leasons.
0 - No cross posting.
1 - Title refers to problem.
2 - The use of txtspk is strictly prohibited.
3 - Give code examples to show you actually tried something, or
4 - explain the concept you are trying to achieve.
You score null.
Panic, Chaos, Destruction.
My work here is done.
|
|
|
|
|
Hy guys ! i'm trying to make an array with the components of my applet like this :
instancing :
public Component[] componente=new Component[100];
@Override
public void init() {
try {
componente=this.getComponents();
...
}
and displaying in a textArea :
for (int i=0;i<componente.length;i++)
{
status.setText("componente :\n");
status.append(i+" "+componente[i].getName()+"\n");
}
the result i get is :
componente :
0 null
my applet however has plenty of componenets, does anybody know why this might happen ?
|
|
|
|
|
The reason it returns null is because the componants havent been initialized by the time init() is called.
Solution: Don't call componente=this.getComponents(); from within init.
Have a look at this[^] for an explanation.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
I suspected that was it, i made my gui using netbeans IDE and it generates an initComponents method , and even tho i used getComponents inside this method afetr it instances the componenets i still get null
|
|
|
|
|
I presume you have something like this:
public GUIView(SingleFrameApplication app) {
super(app);
initComponents();
//TRY IT HERE
}
Personally I hate NetBeans and normally write it all by hand.
This is for a JFrame Application, apologies.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
modified on Saturday, May 9, 2009 12:29 PM
|
|
|
|
|
i really don't have a choice aside from working with netbeans sice my deadline is close and it could never be done in time if i learned how to do it by hand
the call is like this :
public void init() {
try {
initComponents();
initMyComponents();
} catch (Exception ex) {
ex.printStackTrace();
}
}
is there any other way to tell when the initialization is over, or when initComponenets is done executing?
|
|
|
|
|
Try this:
@Override
public void start()
{
}
I haven't used Applets in years, I'm a bit rusty.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
tried that , even inside the paint method , nothing works
btw thanks for all your time fly904
|
|
|
|
|
i am doing a project which is students‘Experiment management system.
then one function of it is teachers' modify students' experiment report.
so i need to add a online word editor to my project.
i hava tried to use dosframer and javascript.but the activex is only available in ie6.so it brings me a lot of trouble!
who can help me and give me some useful suggestions?oh ,my project is based on j2ee. also ,you can visit my website to give me some good suggestions.
if you visit my website ,the userid is 02910 password is 8764321 .you have to choose the category and the category is 教师.then you can try to test it!
the website is http://kforce.vicp.net:1013/ProjectX/[^]
thank you !
modified on Saturday, May 9, 2009 3:58 AM
|
|
|
|
|
0) Don' hand out your username and password, that's not a clever thing to do.
1) Your site is all in chinese(???), not many people here speak or read chinese so this is less than helpful.
2) Be more specific, just say you want to edit a Word file (*.doc) on a web page.
The only two useful bits in your post were:
qiuxumin1 wrote: so i need to add a online word editor to my project.
and
qiuxumin1 wrote: i hava tried to use dosframer and javascript.but the activex is only available in ie6.
The rest is unessesary and irrelevant.
3) Have a look at this[^].
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
thank you very much!
yes,i am from china!i will improve my english!
i hope i can keep in touch with you and learn java from you !
i know using dosframer will lower its security but i hava no other ways!
|
|
|
|
|
Hy guys ! i've been using netbeans to make a GUI, and i'm having rpoblems figuring out how to draw stuff using the canvas object, i've created a canvas object but it needs a graphics object in order to draw stuff, and that's where my problems start, for the life of me i can not understand how to use one of these
this is what i've tried so far :
Graphics g=null;
g.setColor(new Color(255,0,0));
canvas1.paint(g);
when i run this java flares up with null pointer exceptions altho the canvas itself has been instantiated
i've looked on the sun homepage for guidance but there is no hint on how to use an instance of a canvas object, they way they show is by creating a class that inherits Canvas and overwriting it's paint method, but that's no use to me
|
|
|
|
|
I'm not a professional Java programmer, but
g=null; immediately followed by
g.setColor(... doesn't quite look right.
I'd follow the advice of Sun's documentation. Generally the people who made the language know how it's supposed to be used. I found lots of information with a simple google search of "Java Graphics class".
|
|
|
|
|
i hear what you're saying, but i can't instace it like
g=new Graphics();
because it's abstract, the null thing is automated correction from netbeans, it's the only way it will let me use g
the problem i have with sun's exmaple is that i see no point in defining an object that inherits the Canvas to do nothing different that what canvas is supossed to do, it would also render my canvas objects useless and the ability to drag and drop canvas stuff from the IDE pointless
|
|
|
|
|
In my limited time as a Java developer (the last 15 minutes) it sounds like extending the Canvas class in order to draw things on it is it's intended usage. If the IDE has defined a new class for you that extends from it then shouldn't it be as simple as overriding it's paint method?
|
|
|
|
|
[quote]If the IDE has defined a new class for you that extends from it then shouldn't it be as simple as overriding it's paint method?
[/quote]
the IDE creates an instance of the class Canvas, the class that extends Canvas part was in the sun example
|
|
|
|
|
I found in Netbeans in the "Inspector" you can select a GUI element, right click on it and go to "Customize Code". That allows you to change the variable from a standard Canvas to your custom type that extends from Canvas that does the drawing.
|
|
|
|
|
That's an awesome tip Jimmanuel thanks
|
|
|
|
|
What I normally do is to override the default paint method in the Canvas class.
Have a look at this[^]. The SweepCanvas class is the basic principle, just remove the threading obviously.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
[quote]What I normally do is to override the default paint method in the Canvas class.
Have a look at this[^]. The SweepCanvas class is the basic principle, just remove the threading obviously. [/quote]
good tip thank you, what i don't understand is where the run method gets invoked ( and as a consequence the repaint method), If anyone could explain this i think i could get the hang of how this class works. I see that the trick to making this work is calling the paint method using repaint() which saves you from making a Graphics instance( not the most obvious solution but i cant afford to be picky right now).
|
|
|
|