User Profile

Collapse

Profile Sidebar

Collapse
soty
soty
Last Activity: Aug 18 '08, 03:49 PM
Joined: Mar 18 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • soty
    replied to array
    in Java
    thanks i finally solve is but i dont know was jus happen and i started getting this error

    i'm finally done wif ma code but i'm getting this error. do u av any idea wat the prob is?



    Code:
    init:
    deps-jar:
    Compiling 1 source file to /Users/ask4soteria/NetBeansProjects/ticTacToeGame/build/classes
    compile-single:
    run-single:
    Exception in thread "main" java.lang.NullPointerException
    ...
    See more | Go to post
    Last edited by JosAH; Apr 30 '08, 07:56 AM. Reason: fixed the [code] ... [/code] tags

    Leave a comment:


  • soty
    replied to array
    in Java
    finally i was able to come up wif this. but the thing is wrote method for checking if the board is full, method for win, and method t clear screen but i dont know how to use mouse listener to connect it.... also i dont know if my logic is right.


    please i need help its due tuesday.
    Code:
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.event.MouseEvent;
    import javax.swing.*;
    import
    ...
    See more | Go to post

    Leave a comment:


  • soty
    replied to array
    in Java
    i'm tryna create a tictactoe game. but i dont wanna use gdraw . i'm tryna see if i could use jpanel. also i dont wanna use buttons either since i'm gonna use mouse eventlistener. finally the array for the boxes should be 2-dimensional array.

    thank you...
    See more | Go to post

    Leave a comment:


  • soty
    replied to array
    in Java
    i wanna use swing not applet. and i'm using frame and mouseEventListe ner...
    See more | Go to post

    Leave a comment:


  • soty
    started a topic array
    in Java

    array

    Hi

    i'm tryna make a 4 dimensional array that includes colors and changes color when i click any box.

    how do i creat the box first using swing and no applet?

    please note i dont wanna use button.

    thank you
    See more | Go to post

  • soty
    replied to validation of code
    in Java
    hi

    av finished the code but i'm having one slight problem.....eit her av lost it or i'm jus not thinking straight.... either way i guess my logic is not coming out well.

    the problem am having wif this code is that each time i wanna calculate my total sales its resets it to present price. it doesn't add it up.... please can u look into it?

    thanks

    Code:
    
    /*
     *  Name
    ...
    See more | Go to post

    Leave a comment:


  • soty
    replied to Seticon
    in Java
    ok once i figure it out i'll get back at u.

    thank you...
    See more | Go to post

    Leave a comment:


  • soty
    started a topic validation of code
    in Java

    validation of code

    HI

    i wrote a code to validate cash for a vending machine.... the problem am having is dat dat my code failed to validate any ammount.

    please help!!!!


    the code is below


    public static double validDollarNote () {

    boolean done = false;
    double cash = 0.0;
    String bill;

    double Nickel = 0.05;
    ...
    See more | Go to post

  • soty
    replied to Seticon
    in Java
    oh ok

    uhmmm
    i dont know how to do dat....
    See more | Go to post

    Leave a comment:


  • soty
    replied to Seticon
    in Java
    hi i covered the init () curly bracket and the class curly bracket. so which of the curly bracket where u asking me about?

    thanks you...
    See more | Go to post

    Leave a comment:


  • soty
    replied to Seticon
    in Java
    thanks.

    ok av changed evrything from label , panel to Jlabel ,Jpanel but my pics r still not showing on the button. i'm gonna repost ma code so u look at it. thank you.






    Code:
    import java.awt.*;
    import java.applet.*;
    //import java.awt.event.ActionListener;*/
    import javax.swing.ImageIcon;
    import javax.swing.JButton;
    import javax.swing.JLabel;
    ...
    See more | Go to post

    Leave a comment:


  • soty
    replied to Seticon
    in Java
    the pictures are in the same folder wif the source file.

    this is the code

    thank you








    [CODE=java] import java.awt.*;
    import java.applet.*;
    import java.awt.event. ActionListener;
    import javax.swing.Ico n;
    import javax.swing.Ima geIcon;
    import javax.swing.JBu tton;
    import javax.swing.JTe xtPane;


    public class vendmachine...
    See more | Go to post
    Last edited by r035198x; Mar 25 '08, 07:36 AM. Reason: Added code tags, please don't forget them next time.

    Leave a comment:


  • soty
    replied to Seticon
    in Java
    thanks a lot for clarifying the difference btw button and jbutton.

    the error has been solved.

    .....uhmmm i av another question.

    my pictures are not show on the buttons. can u tell me wat the problem is?

    Thank you....
    See more | Go to post

    Leave a comment:


  • soty
    replied to Seticon
    in Java
    ok i jus changed it and i av a new error. which is below



    thank you




    init:
    deps-jar:
    Compiling 1 source file to /Users/ask4soteria/NetBeansProject s/vendmachine/build/classes
    /Users/ask4soteria/NetBeansProject s/vendmachine/src/vendmachine.jav a:55: cannot find symbol
    symbol : method setIcon(javax.s wing.ImageIcon)
    location: class java.awt.Button...
    See more | Go to post

    Leave a comment:


  • soty
    replied to Seticon
    in Java
    i dont understand wat u meant by initialization method....
    See more | Go to post

    Leave a comment:


  • soty
    replied to Seticon
    in Java
    i posted everything. and i'm reposting it with the line 30 to 40 indicated in bold.

    thank you.


    import java.awt.*;
    import java.applet.*;
    import java.awt.event. ActionListener;
    import javax.swing.Ico n;
    import javax.swing.Ima geIcon;
    import javax.swing.JTe xtPane;


    public class vendmachine extends Applet
    {
    Color Armygreen = new Color(120, 100,...
    See more | Go to post

    Leave a comment:


  • soty
    replied to Seticon
    in Java
    import java.awt.*;
    import java.applet.*;
    import java.awt.event. ActionListener;
    import javax.swing.Ico n;
    import javax.swing.Ima geIcon;
    import javax.swing.JTe xtPane;


    public class vendmachine extends Applet
    {
    Color Armygreen = new Color(120, 100, 50);

    Panel panel1 = new Panel();
    Label header = new Label("WELCOME TO UJU'S VENDING...
    See more | Go to post

    Leave a comment:


  • soty
    replied to Seticon
    in Java
    hi this is the error when i tried running the code




    init:
    deps-jar:
    Compiling 1 source file to /Users/ask4soteria/NetBeansProject s/vendmachine/build/classes
    /Users/ask4soteria/NetBeansProject s/vendmachine/src/vendmachine.jav a:32: <identifier> expected
    chip.setIcon(ne w ImageIcon("chip s1.gif"));
    /Users/ask4soteria/NetBeansProject s/vendmachine/src/vendmachine.jav a:33:...
    See more | Go to post

    Leave a comment:


  • soty
    replied to Seticon
    in Java
    pls i dont understand. r u saying i shouldn't use applets?....tho i'm still trying to understand the relationship btw applet and applications, by removing awt i cant function wif applet right?


    also r u saying i should use main() instead? and if dats the case how would i build the applet

    and if am using swing how would i use it without using awt?


    thank you....
    See more | Go to post

    Leave a comment:


  • soty
    replied to Seticon
    in Java
    i asked my classmate and he told me it was a capital S.. but av changed it tho.

    its still giving me the same error....
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...