Results 1 to 6 of 6
Thread: need a help!!
- 12-23-2009, 07:24 AM #1
Member
- Join Date
- Oct 2009
- Posts
- 40
- Rep Power
- 0
- 12-23-2009, 10:31 AM #2
Member
- Join Date
- Dec 2009
- Location
- Rio de Janeiro
- Posts
- 38
- Rep Power
- 0
People won't post the solution to your problem (at least not for free) hehehe
Try to show that you're interested and paste here something that you've done and the questions that you have! =)Please don't laugh at my English... I'm trying my best! :)
- 12-24-2009, 04:38 PM #3
Member
- Join Date
- Sep 2009
- Posts
- 37
- Rep Power
- 0
Hi.
In my opinion, you can refer to the url below:
Create dynamic images in Java servlets - JavaWorld
Regards,
raqman.RAQ Report: free Java reporting tool.
- 12-24-2009, 04:50 PM #4
Member
- Join Date
- Dec 2009
- Posts
- 25
- Rep Power
- 0
class vs object
Thankyou for the replies. I am reading dave eck's book online. Sec 3.8 starts to talk about applets. And the sentence
An applet is a Java program that runs on a Web page. An applet is not a stand-alone application, and it does not have a main() routine. In fact, an applet is an object rather than a class.
confused me. I come from c++. And object is just an instance of a class. To me, the above sentence means that the applet is created from a class and not something else.
thanks
bill
- 01-04-2010, 06:53 AM #5
Member
- Join Date
- Oct 2009
- Posts
- 40
- Rep Power
- 0
hi...
This is my code(servlet program) where I have receive a 4 values from html page.then I have 2 dispaly a graph according to that value .program for displaying a graph is the above code....but that not working.plz correct me.xyline is another java program for creation of graph.Java Code:import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import linegraph.xyLine.; public class GetParameter extends HttpServlet { public void doPost(HttpServletRequest request,HttpServletResponse response) throws IOException, ServletException{ String line = request.getParameter("t1"); String line1 = request.getParameter("t2"); String line2 = request.getParameter("t3"); String line3 = request.getParameter("t4"); int coordinates=Integer.parseInt(line); int coordinates1=Integer.parseInt(line1); int coordinates2=Integer.parseInt(line2); int coordinates3=Integer.parseInt(line3); // set the response type response.setContentType("image/gif"); // send the image straight to the client ServletOutputStream out = response.getOutputStream(); xyLine rashi=new xyLine(); rashi.addd(20,40,20,20); } }
- 01-04-2010, 07:11 AM #6gcampton Guest
try not to hijack threads billyq, getting your head around java concepts is a little different to c++, it's annoying I am constantly confusing myself in C++ because I assume, things in c are pretty much the same as java. for instance: 2-dimension arrays are not 2-dimensional arrays in C++ they are just "regular arrays with syntactical sugar" as most C++ gurus believe.
( "pppffffttt" is the response that pops into my mind..)
truth is I don't think it matters too much how you look at things, so long as you understand the logic your programs need to follow, the syntax of the language, and keeping it simple. Semantics can be ignored.
look at it this way, applets were originally designed to be embeded in webpages, but then the "applet viewer" came about so now applets can actually be run much like programs (why you would want this is redundant). Apps are apps, applets are just apps.
However applets don't contain a main they are instantiated much like an object.
When you create an object of a class that is of type applet it makes an "object of that class" so you are correct. just ignore semantics so long as you kinda grasp how to make an applet happen, and when the best time to use them is... nothing else matters.
also in java, we have 'primitive objects' 'Integer', 'Double' etc (these are classes that you can make objects of), and arrays and strings are also objects. everything is object.... aparentlyLast edited by gcampton; 01-04-2010 at 07:14 AM.


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks