Results 1 to 4 of 4
  1. #1
    utoptas is offline Member
    Join Date
    Aug 2010
    Posts
    1
    Rep Power
    0

    Default Action button HELP?

    hi.. i want to add two button.. and chose one of them chart with by button...

    package chart_exapmles;
    import java.awt.BorderLayout;
    import java.awt.Color;

    import java.awt.GridLayout;

    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import org.jfree.chart.ChartPanel;
    import org.jfree.chart.JFreeChart;
    import org.jfree.data.category.CategoryDataset;
    public class single_chart extends JFrame {

    String bspr_mem ="";
    String bspr_cpu ="";
    String rtx_mem="";
    String rtx_cpu ="";
    public single_chart() {
    super("baslık");
    final JPanel girispanel_kuzey = new JPanel(new GridLayout(2,2,1,1));
    //final JPanel girispanel_guney = new JPanel(new GridLayout(1,2,1,1));
    //JPanel dugmepanel = new JPanel(new FlowLayout(FlowLayout.LEFT,2,2));

    double_list dd= new double_list();
    setBackground(Color.red);
    setForeground(Color.red);


    add(girispanel_kuzey);
    setSize(java.awt.Toolkit.getDefaultToolkit().getSc reenSize());

    /////////////////////////////////////////1.chart///////////////////////////////////////////


    CategoryDataset dataset_bspr_cpu =dd.createDataset_bspr();
    JFreeChart chart_bspr_cpu = dd.createChart(dataset_bspr_cpu,"lhssunp00 cpu");
    ChartPanel chartPanel_bspr_cpu = new ChartPanel(chart_bspr_cpu);
    chartPanel_bspr_cpu.setPreferredSize(new java.awt.Dimension(1400,700));

    ////////////////////2. chart //////////////////////////////////////////////////////////////////////

    CategoryDataset bspr_memory =dd.createDataset_bspr_memory();
    JFreeChart chart_bspr_memory = dd.createChart(bspr_memory,"lhssunp00 memory");
    ChartPanel chartPanel_bspr_memory = new ChartPanel(chart_bspr_memory);
    chartPanel_bspr_memory.setPreferredSize(new java.awt.Dimension(1400,700));
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    girispanel_kuzey.add(chartPanel_bspr_cpu);
    girispanel_kuzey.add(chartPanel_bspr_memory);

    setLocationRelativeTo(null);
    setEnabled(true);
    }
    }

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Please ask an actual question and in the question tell us what is not working currently and gives us useful information that allows us to give you an intelligent answer. Also, please don't enclose your code in quote tags as the code loses its formatting, but rather use code tags.

    Luck.

  3. #3
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    Quote Originally Posted by Norm View Post
    and he appears to be replying to posts in that thread, but not in this one. Thanks for the heads up. Let's lock this thread so as not to fragment his discussion.

Similar Threads

  1. Replies: 3
    Last Post: 08-19-2010, 08:27 AM
  2. Action(s) is looking for testers
    By app.jbbres.com in forum Reviews / Advertising
    Replies: 0
    Last Post: 06-26-2010, 11:51 PM
  3. How can I catch the radio button action in jsp?
    By srinivas2828 in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 09-18-2009, 04:05 PM
  4. Please help on Button action
    By michaelxiao in forum New To Java
    Replies: 4
    Last Post: 04-24-2009, 10:55 PM
  5. action class
    By jayagowri in forum Web Frameworks
    Replies: 1
    Last Post: 05-07-2008, 03:23 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •