Welcome back, Guest!
Register
Forgot your Password?

Hello, Guest! Welcome to Symbianize Forum.

Most of our features and services are available only to our members. So we encourage you to login or join us by registering a new account. Registration is free, fast, and simple. You only need to provide a valid email address so we can minimize spammers. As a Symbianize member you'll have the following privileges:

All that and more, so what are you waiting for, join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Page 7 of 7 FirstFirst ... 567
Results 61 to 70 of 70
  1. #61

    Default Re: How to put Pictures on JAVA Eclipse Applet.

    try niyo po to baka makatulong

    Image img = getImage(getCodeBase(), "imagepath");

    ngayon mayroon na po kayong image na pwede niyong gamitin sa drawImage();

  2. #62

    Default Re: How to put Pictures on JAVA Eclipse Applet.

    pwede po ba ung buong code po or sample na gawa nyo para po mas maintindihan ko? t y po

  3. #63

    Post Re: How to put Pictures on JAVA Eclipse Applet.

    parang ganito

    public void init()
    {
    //...
    image = getImage(getCodeBase(), "yourImage.gif");
    //...
    }

    public void paint(Graphics g)
    {
    //...
    g.drawImage(image,0,0,this);
    //...
    }

  4. #64

    Default Re: How to put Pictures on JAVA Eclipse Applet.

    yun ty po

  5. #65

    Default Re: How to put Pictures on JAVA Eclipse Applet.

    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.io.*;
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.image.BufferedImage;
    public class EStore extends Applet {
    private JLabel l1,l2,l3,l4,l5,l6,l7,l8,l9,l10,l11,l12,l13,l14,l15 ,l16,l17,l18;
    private JTextField t1,t2,t3,t4,t5,t6,t7;
    private JButton b1,b2,b3;
    private Compute c;
    private Clear cl;
    private Exit e;
    private php p;
    private php2 p2;
    private php3 p3;



    public void init()
    {
    createGui();


    Image image = getImage(getCodeBase(), "A.jpg");

    }

    public void paint(Graphics g)
    {

    g.drawImage(getImage(null),0,0,this);

    }

    public void createGui(){



    setLayout(new GridLayout(15,3));


    add(l1 = new JLabel("CAP"));

    add(l4 = new JLabel("Price: 100"));
    add(l10 = new JLabel("Qty"));
    add(t1 = new JTextField(10));
    p = new php();
    t1.addActionListener(p);
    add(l13 = new JLabel("Php"));
    add(t4 = new JTextField(10));
    t4.setEditable(false);

    add(l2 = new JLabel("White Shirt"));
    add(l6 = new JLabel("Price: 200"));
    add(l11 = new JLabel("Qty"));
    add(t2 = new JTextField(10));
    p2 = new php2();
    t2.addActionListener(p2);
    add(l14 = new JLabel("Php"));
    add(t5 = new JTextField(10));
    t5.setEditable(false);

    add(l3 = new JLabel("Polo Shirt"));
    add(l8 = new JLabel("Price: 300"));
    add(l12 = new JLabel("Qty"));
    add(t3 = new JTextField(10));
    p3 = new php3();
    t3.addActionListener(p3);
    add(l15 = new JLabel("Php"));
    add(t6 = new JTextField(10));
    t6.setEditable(false);



    add(l17 = new JLabel(""));
    add(l18 = new JLabel(""));
    add(l16 = new JLabel("Total"));
    add(t7 = new JTextField(10));
    t7.setEditable(false);

    add(b1 = new JButton("Compute"));
    c = new Compute();
    b1.addActionListener(c);

    add(b2 = new JButton("Clear"));
    cl = new Clear();
    b2.addActionListener(cl);

    add(b3 = new JButton("Exit"));
    e = new Exit();
    b3.addActionListener(e);


    }
    private class Clear implements ActionListener{
    public void actionPerformed(ActionEvent e){
    t1.setText("");
    t2.setText("");
    t3.setText("");
    t4.setText("");
    t5.setText("");
    t6.setText("");
    t7.setText("");
    t1.requestFocus(true);
    }
    }
    private class Exit implements ActionListener{
    public void actionPerformed(ActionEvent e){
    System.exit(0);

    }
    }
    private class Compute implements ActionListener{
    public void actionPerformed(ActionEvent e){
    double Qty1,Qty2,Qty3;

    Qty1 = Double.parseDouble(t1.getText());
    Qty2 = Double.parseDouble(t2.getText());
    Qty3 = Double.parseDouble(t3.getText());

    GS a = new GS();
    a.setQty1(Qty1);
    a.setQty2(Qty2);
    a.setQty3(Qty3);
    a.MethodtoCompute();
    t4.setText(""+a.getPhp1());
    t5.setText(""+a.getPhp2());
    t6.setText(""+a.getPhp3());
    t7.setText(""+a.gettotal());


    }
    }
    private class php implements ActionListener{
    public void actionPerformed(ActionEvent e){
    double Qty1, Php1;

    Qty1 = Double.parseDouble(t1.getText());
    Php1 = (Qty1 * 100.00);
    t4.setText(""+Php1);




    }
    }
    private class php2 implements ActionListener{
    public void actionPerformed(ActionEvent e){
    double Qty2,Php2;

    Qty2 = Double.parseDouble(t2.getText());
    Php2 =(Qty2 * 200.00);
    t5.setText(""+Php2);

    }
    }
    private class php3 implements ActionListener{
    public void actionPerformed(ActionEvent e){
    double Qty3,Php3;

    Qty3 = Double.parseDouble(t3.getText());
    Php3 =(Qty3 * 300.00);
    t6.setText(""+Php3);




    }
    }

    }





    ETO PO UNG CODE KO? Anu pong mali? ung A.jpg po un po ung picture

  6. #66

    Default Re: How to put Pictures on JAVA Eclipse Applet.

    boss ideclare mo sa labas ng init ang image

    tapos yung g.drawImage(getImage(null),0,0,this);
    gawin mong g.drawImage(image,0,0,this);

  7. #67

    Default Help!!! Java please!!

    Nasa Attachment na po ung Explanation ang hirap kasi pinapagawa eto without using JButton di ko alam pano gawin
    Attached Images Attached Images

  8. #68

    Default Re: Help!!! Java please!!

    magaral ka

  9. #69

    Default Re: Help!!! Java please!!

    Quote Originally Posted by jex182 [Link available to registered users only. Click here to register.]
    Nasa Attachment na po ung Explanation ang hirap kasi pinapagawa eto without using JButton di ko alam pano gawin
    Ang kaylangan jan is an event listener. Na onChange or on change value. Na kapag nag change ang value ng text box. Hahanapin nya un kung asa list tapos iaaply nya ung changes base sa function na nilagay mo sa listener.

    Madami pang event na pwede mong gamitin. on blur pwede rin. Pero mas ok ung on change value.

    Eto po some examples:

    [Link available to registered users only. Click here to register.]

    [Link available to registered users only. Click here to register.]

  10. #70

    Default Re: Help!!! Java please!!

    Quote Originally Posted by zerosoft [Link available to registered users only. Click here to register.]
    magaral ka
    Best answer so far. Dami puro patulong wala naman sila ka-effort effort. Bat di kaya sila magpost ng code nila para matulungan. Ang ginagawa nila lalagyan ng title na "Help(eye sore)". But in reality gusto lang magpagawa.

    Sa mga ibang mga forums pag nagpapatulong may code na naka-attach. Kung walang code di ka nila tutulungan.
    ([Link available to registered users only. Click here to register.]) - - -> visit this site
    Dito sa symbianize medyo nasanay sila kasi napansin ko ang daming nagpapasikat din eh. Kaya madami sa mga forumers ginagawang taga-gawa ng projects at assignment yung mga magagaling na members dito.

    Kung di kayang mag sumikap mag HRM na lng.
    No offense po! (PEACE)

Page 7 of 7 FirstFirst ... 567

Posting Permissions

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