Drawing a Dynamic Graph Using Java/J2EE Technology

Dear Friends,
I have a immediate requirement.
I have to draw a dynamic graph based on changing statistical data(Stock market appliaction).
Have a look at finance.yahoo.com.There we can a find a dynamic graph.The x and y axis in the graph will change according to the data it recieves without using refresh option and all ... In a periodic interval of time ,say for every 10 minutes the application have to check whether it has any changes in the statistical data it recieves (the data maybe from database or form anyother application). If it finds any changes ,automatically it should reflect those changes in the graph.
Please help me out friends . I have been struggling with this over a period of time but am not able to resolve.
Please provide me with any sample application and code.
Keeping my fingers crossed.
Thanks in Advance.

I don't have example code, but I am sure JFree.org has lots. It's a free chart API for Java, that also works with Servlets etc.

Similar Messages

  • How to Draw a line Graph using x,y Cordinates in Java ?

    Hi,
    what r the easiest way to draw a line Graph using Java Code either applet.
    can u give me code sample. or any package where we can pass some parameter so that accoring to the paramter as i know jfreeChart.function() like some method is there from toold jChart.
    Is it possible.
    Regards,
    Prabhat

    There's a number of sample applications in one of the packages of freechart, one of which should do the trick.
    If you're doing applets I suggest you look at genjar from the sourceforge site. What that does is bundle classes from a set of library jars into one jar, selecting only classes that are referenced. That should simplify the transfer problem.
    To draw graphs, typically, you create a DefaultXYDataset object, add data points and then use the appropriate ChartFactory.createXXX methods to build a chart object. Then you wrap that in a ChartPanel to display.

  • How to determine the presence of adobe pdf reader using java/J2EE?

    Can someone share this with me. I need to determing how do we determine if adobe reader is installed on a user's machine or not - using java/J2EE.
    Any ideas?
    Thanks,
    Pratik.

    I am in the software, where can I find it?
    On Tue, Jan 27, 2015 at 9:59 AM, Sara.Forsberg <[email protected]>

  • CAN I USE JAVA CARD TECHNOLOGY TO BUILD BIOMETRIC COLLEGE ATTENDANCE SYSTEM

    HELLO everybody,
    I am new in Java card technology.Please any one can guide me.Can i use Java Card Technology to build biometrics college attendance system.If i can so which device should i need to buy or eBooks..
    PLEASE I NEED HELP..
    Thanks for your time ..
    I am looking forward to hearing from everyone..
    Thanks
    Durjan Hussain
    SCJP1.4,SCWCD

    Thanks AlexRashevsky for your good comments,
    I want to build Student Biometrics Attendance system.I want to use biometrics reader.Please i need guide for which biometrics device can i use to build the system.If you can give me your contact number that could be great with country code.Because i am doing this Project for my M.Sc dissertation and also for real client.
    I am looking forward to hear from you.
    Thanks.

  • Create the graph using java applet

    Hi friends,
    I have one urgent requirement.I need to create the flowchart by using java code.I have data in database.based on that i need to create the parent child relationchip graph..plase anybody help me .
    Thanks&Regards,
    Yousuf alam.A

    malcolmmc wrote:
    JFreeChart has been the favourite Java graph drawing library but, last time I looked, it didn't do flowcharts. If I were you I'd fire up Google and hunt around for a 3rd party library that does. Of course it's a pain if you have to use such libraries in an Applet. It's generally better to generate an image file on a server and display it as part of your html page.Sorry Malcolm but I don't think JFreeChart is applicable. The OP is asking for Flowcharts which are a graph as in nodes and edges. JGraph (Google) is probably what the OP wants but he is in for a shock when it comes to using it.

  • Dynamic Programming Using Java

    hiiii...anyone knows how to use a dynamic programming to compare a mouse movement using java??? i hope some one can help me......

    This was just an idea. I do not know of any program
    implementing this. I will not help you store coordinates
    into a database, but I can explain my suggestion in
    more detail.
    Since the characters might be more dependent on the page
    then the user, you must make a sub character for each page.
    Your table row must then contain following fields:
    user, time, page, x-cord, and y-cord.
    Now assume following
    - we will use the characters 'average speed' and
    'centre of gravity of movement'.
    - we have two sessions of data, that is two sets of table
    rows as described above. Every set belongs to different
    users.
    - the sessions are spread on a set of pages.
    Now we will compute the distance between these users. There
    are a lot of distance metrics but let us choose the most
    common one. Let P be a set of points in R^n and p.n
    be the n coordinate of the point p in P. Then for any p1
    and p2 in P, define the distance metric to be
    D(p1,p2) = summa_{over n} (p1.n-p2.n)^2
    Define the average speed for a certain user and page to be
    Speed(user, page) (in) R. Further more let
    Gravity(user, page) (in) R^2 be the centre of gravity of
    movement for a user and page.
    Then the total distance is
    D(user_1, user_2) = summa_{over all pages} k1*D(Gravity(user_1, page), Gravity(user_2, page)) + k2*D(Speed(user_1, page), Speed(user_2, page))
    where k1 and k2 are constants determines the importance
    you want to assign the two characters.

  • Oracle ADF/BC4J vs "other" Java/J2ee technologies. Influence a decision

    Dear All,
    Our dev group is now at the stage when we need to make a decision which way to go - "proprietary" Oracle ADF/BC4J route or open source/java/j2ee standard. In our group we have a mix of Oracle Foms, pl/sql and java developers. The problem is that our core java developers are strictly against any proprietary thing, and they do not really want to even take a look at ADF/BC4J claiming that when it comes to resolving performance and other issues we will be better off with open source, rather than depend on Oracle...
    I am coming from an Oracle centric world, and to me ADF is a natural choice, however I do not have a lot of experience in Java/J2EE to post a strong argument for or against ADF and BC4J.
    I am just wondering if there is a case study, or comprehensive cons and pros for one or the other path.
    I will greatly appreciate anyone's answer.
    Thank you,
    VO

    "When it comes resolving performance and other issues we will be better off with open source."Really? How - are they planning to go into the hibernate/spring engine and fix the problems? Or do they have a specific "support" contract with some company that will guarantee them fixes to these issues? If they do have such a contract how much does this support costs the organization?
    Where is the notion that open-source is faster coming from? Certainly not from actual benchmarks like this one: http://www.spec.org/jAppServer2004/results/
    As Frank said your management might want to look into a more complete picture than what your Java developers are looking at.
    For example, given that you have Forms based developers, how fast can they get up to speed with the open source solution vs the ADF solution?
    I think a simple benchmark of productivity when building an application with the stack they are offering vs the ADF stack would prove the point even better.
    Don't have time to run one have a look at the RAD Race results from this year where ADF based team beat up Spring based teams.
    http://www.bloggingaboutoracle.org/archives/javapolis-radrace-the-full-story
    and
    http://www.radrace.org/en/JPed_2006/JP_report_2006.html#

  • How can I draw a bar graph using netbeans?

    Hello, I am quite new to java and netbeans. I have got the hang of placing controls on the forms and getting them to function.. Now I want to be able to draw a graph. Is there a way I can do this is net beans? Or is there a control that lets me draw lines into it, like the PictureBox in Visual Basic?
    Thanks

    Speedster239 wrote:
    You need to get the grapics of the frame component in order to draw on it with java.awt.Graphics.
    Use something like:
    Graphics g = frame.getGraphics();
    This is wrong. See the comment about subclassing JPanel. Demo:
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    import javax.swing.*;
    public class ExamplePanel extends JPanel implements ActionListener {
        private java.util.List<Shape> shapes = new ArrayList<Shape>();
        private Random rnd = new Random();
        public ExamplePanel() {
            new javax.swing.Timer(500, this).start();
        public void actionPerformed(ActionEvent evt) {
            int x = rnd.nextInt(getWidth());
            int y = rnd.nextInt(getHeight());
            shapes.add(new Rectangle(x-5, y-5, 10, 10));
            repaint();
        protected void paintComponent(Graphics g) {
            super.paintComponent(g);
            Graphics2D g2 = (Graphics2D) g;
            for(Shape shape : shapes) {
                g2.draw(shape);
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable(){
                public void run() {
                    ExamplePanel comp = new ExamplePanel();
                    comp.setPreferredSize(new Dimension(400, 300));
                    JFrame f = new JFrame();
                    f.getContentPane().add(comp);
                    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    f.pack();
                    f.setLocationRelativeTo(null);
                    f.setVisible(true);
    }

  • How can i send the chinese sms using java J2EE(web application)

    hi,
    i have the difficulty on sending chinese sms using J2EE application.i try to input the chinese word to jsp and send the plain text sms. i received the sms with plenty of question mark "?????". i think it is regarding to the conversion of String to some kind of format that supported by mobile phone. below are some code the send the sms to recipient. i need someone help in order to have the solution.
    thanks a lot
    <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
    <%@ page import="se.sapio.rta.service.MPMService"%>
    <%@ page import="java.util.Locale"%>
    <%
         Locale.setDefault(Locale.UK);
         Context ctx;
         MPMService mpmservice;
         ctx = new InitialContext();
         mpmservice = (MPMService) ctx.lookup("BC/Service/RTAMPM");
         LSUser user = null;
         boolean ok = true;
         try {
         if (ok) {
              String sender = request.getParameter("sender");
              String phonenr = request.getParameter("phonenr");
              String sendmsg = request.getParameter("sendmsg");
              if(bError) {
                   byte[] bytes = message.getBytes("UTF-8");
                   message = mobileclientservice.ByteEncode(bytes);          
                   response.sendRedirect("send_sms.jsp?s="+request.getParameter("s")+"&msg="+message+"&phonenr="+request.getParameter("phonenr").replaceAll("\\+","%2B")+"&sender="+request.getParameter("sender")+"&sendmsg="+request.getParameter("sendmsg").replaceAll("\\+","%2B"));
              String resp = "";
              if(mpmservice.sendPlainTextSMS(sender, phonenr, sendmsg)) {
                   resp=mpmservice.getLang(user.getLang(), "sms_sent");
              } else {
                   resp=mpmservice.getLang(user.getLang(), "sms_not_sent");
              } %>
              <jsp:include page="/top.jsp" />
              <p class="headline"><%=mpmservice.getLang(user.getLang(), "send_sms_title")%></p>
              <form name="operatordetails" id="operatordetails" method="post" action="send_sms.jsp">
              <INPUT TYPE=hidden NAME=s VALUE="<%=request.getParameter("s")%>">
              <INPUT TYPE=hidden NAME=phonenr VALUE="<%=request.getParameter("phonenr")%>">
              <table class="infotable" id="report">
                   <tr>
                        <td class="left" colspan="2"><%=resp%></td>
                        <td class="right"></td>
                   </tr>
                   <tr>
                        <td class="left" colspan="2">
                             <input class="halfmiddle" name="Back" type="submit" id="Back" value="<%=mpmservice.getLang(user.getLang(), "back")%>" />
                        </td>     
                        <td class="right"> </td>
                   </tr>
              </table>
              </form>
              <jsp:include page="/bottom.jsp" />
         <% } %>
       public boolean sendPlainTextSMS(String sender, String recipient, String sendmsg){
             if(recipient.charAt(0) == '+')
                   recipient = recipient.substring(1);
             String senderIdType = "Alpha";
              if( (sender.charAt(0) >= '0' && sender.charAt(0) <= '9') || sender.charAt(0) == '+')
                   senderIdType = "Numeric";
                   if(sender.charAt(0) == '+')
                        sender = sender.substring(1);
                   for(int i=0; i < sender.length(); i++)
                        if(!(sender.charAt(i) >= '0' && sender.charAt(i) <= '9'))
                             senderIdType = "Alpha";
             log.warn("sending sms to: "+recipient + " sendtype: " + senderIdType + " msg: "+ sendmsg);
             log.warn("Encoded sms:"+Encode(sendmsg));
             try{
             String postData = "XMLDATA=" + URLEncoder.encode("<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\r\n" +
                        "<NotificationRequest Version=\"3.4\">\r\n" +
                        "     <NotificationHeader>\r\n" +
                        "          <PartnerName>" + SMS_PARTNER_NAME + "</PartnerName>\r\n" +
                        "          <PartnerPassword>" + SMS_PARTNER_PASSWORD + "</PartnerPassword>\r\n" +
                        "          <SubscriptionName>XML</SubscriptionName>\r\n" +
                        "     </NotificationHeader>\r\n" +
                        "     <NotificationList BatchID=\"1\">\r\n" +
                        "          <Notification SequenceNumber=\"0\" MessageType=\"SMS\">\r\n" +
                        "          <Message>" + Encode(sendmsg) + "</Message>\r\n" +
                        "          <Profile>" + SMS_PARTNER_PROFILE + "</Profile>\r\n" +
                        "          <SenderID Type=\"" + senderIdType + "\">" + sender + "</SenderID>\r\n" +
                        "          <Subscriber>\r\n" +
                        "               <SubscriberNumber>" + recipient + "</SubscriberNumber>\r\n" +
                        "          </Subscriber>\r\n" +
                        "      </Notification>\r\n" +
                        " </NotificationList>\r\n" +
                        "</NotificationRequest>","ISO-8859-1");
      appreciate for anyone provide the solution.
    thanks a lot

    Hi,
    I want to send sms from web application to mobile phones at the time of registration. Its verymuch greatful to me, if you let me know, how to send from jsp to mobile. because from your post, i got, you already know about sending sms from jsp to mobile.
    please let me know, how to send sms
    [email protected]
    Thanks in advance for your kind help

  • How to draw multiple line graph using bi graph in  JHeastart?

    hello,
    i have a problem when displaying a multiple graph in JHeadstart.i had created a graph that represent the report of medical testing.my x-axis is "report date",my y-axis is "observation value" then my series attributes is depend on "item description" .
    One patient has many "item description",each "item description" has one "observation value" and each "item description" has many "report date".
    when the graph was displayed,it only show me in 1 line,then it is depend on the id patient but not like what i set in the graph wizard.actually,it should be display fews line accroding to the "item description".
    then,the "observation value" and "item description" are get from defferent entity object.
    i dun know what was happen.any hits are welcome.
    thanks

    yes,finally i found how to draw it.Actually the series attributes is depend on VO's primary key .
    thanks to who was view my problem.

  • How to Draw a line graph showing memmory usage like TaskManager in W2K2

    Hi
    Anybody help me how to draw a realtime graph using java which shows the memmory usage just like the windows 2000 server task manager.
    I tried jconsole but too big to accomodate in my gui.
    thanks
    jossy v jose

    http://www.jfree.org/jfreechart/index.php

  • Java J2EE XML Developer Required - Luxembourg

    Java J2EE XML XSLT Developer - Investment Banking - Luxembourg
    French speaking candidates required to work on assignment to this leading investment Bank. You will need a good experience of Java J2EE technologies, XML and XSLT, and ideally Sybase ASA & PowerBuilder or SQL Server or Oracle. Knowledge of SQL, Stored Procedures, UNIX / Solaris of benefit. This will be a long-term contract for the right candidate. Candidates will need customer facing experience and able to propose effective technical solutions at all levels.
    Please make contact for further information.
    Best regards
    Benjamin Corke
    cerebra recruitment ltd
    +44 (0) 1483 300515
    ben AT cerebra.co.uk
    http://www.cerebra.co.uk/it
    http://jobs.cerebra.co.uk

    And the salary will be in duke dollars?
    When you signed up on this site, and supposedly read the terms of use, what gave you the idea that posting a job offer here was acceptable?

  • HTML/Java/J2ee IDE / Dev WEB app

    I am creating one web application using Java/J2EE. My web page would contain menu and sub menu system.
    I have to use HTML/JSP/Servlet/EJB/SQL Server.
    For HTML I am using dream weaver and for java code notepad.
    I want to use some GUI tool to develop this application.
    1.     GUI for developing HTML page and text editor for Java code with drag and drop facility for HTML and JAVA/J2ee both with easy integration between these two technology components.
    Or
    2.     Any single GUI tool which provide HTML and JAVA/J2EE editor and drag and drop facility for HTML and JAVA/J2ee both.
    Please help me by suggesting!

    Now, with all this added complexity, what was the
    point. I kinda thought it was to create a standard, so
    that deployment was easy.I agree that deployment is not as easy as you would like it to be. However most of this added complexity is to handle situations consistently. And nowadays there are plenty of tools available (my Company makes one), which can simplify the deployment.
    Can anyone out there tell me why we should conform to
    these standards if the web app servers
    won't!!!!!!!!!!!!!!!!!!!!!!!!!That is not how it should be, I agree. While building OptimalJ (the tool we make)we experienced differences between app servers as well. However again, there are tools which make this easier for you (although I don't think they solve it completely yet...).
    Hopefully we end up in a situation where all EAR files can be interchanged more easily.
    Regards,
    Michiel.

  • What about olap using java tech?

    i'm now producing a project writting in java whose db server is microsoft sqlserver 7. one of the requirements is to query data from within the multidimentional data store(data warehouse or something). the help microsoft offers mentions how to connect to the olap service via visual basic or the development languages that support COM and ole db....what if i am using java database technology to connect olap service shipped with ms sql server 7? jolap? or do i have to change the dbms to oracle--impossible:~~
    HELP!!

    jasan! well, it's lucky for me to wrap the COM into a set of classes to access olap service of sqlserver via some third-party utilities. all seem going smooth but the problem is that my program could run only with microsoft Windows, for the project it's okay. and for thor_jd, could you tell me if Sun has released the JOLAP and does there exit any product or, to say, a set of API, to support JOLAP?

  • How to get a dynamic pages using jsp?

    actually using jsp we create static pages.
    My question is whether it is possible to create dynamic pages. ie the page should reflect changes without refreshing or reloading. for example we have date timings frequently updated without refreshing

    Read Beginning JSP from WROX Press. It is a good book for developing dynamic JSP using all latest technologies.

Maybe you are looking for