User Profile

Collapse

Profile Sidebar

Collapse
JanineXD
JanineXD
Last Activity: Nov 24 '10, 05:03 AM
Joined: Feb 4 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • JanineXD
    started a topic Cannot find symbol class (Java swing)
    in Java

    Cannot find symbol class (Java swing)

    Hey,

    I seem to have a problem on a Java Swing Program with ActionListener. I've tried to use getSource in our class but seem don't have an idea why it won't work when I tried to program at home. ( I'm using an earlier version of JCreator in school and a JCreator Pro here at home, Does that affect the program at all? )

    Here's the code:
    Code:
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    ...
    See more | Go to post

  • JanineXD
    started a topic ArrayIndexOutOfBoundsException ( Partition )
    in Java

    ArrayIndexOutOfBoundsException ( Partition )

    I was browsing the web for examples on how to partition in Java. I've got to this website that has a detailed example about Partitioning so I've tried to run it on my JCreator Pro.

    I've only got one error, but I've tried all I can do to fix it ( Put BufferedReader, import java.io.*, throws IOException ), and It still wouldn't work.

    Here's the Error:
    Code:
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException:
    ...
    See more | Go to post

  • JanineXD
    replied to Conver number to words (thousands) help
    in Java
    like this one?
    Code:
    public class NumberToWords {
    
    	private static final String[] ONES = {
    		"Zero", "One", "Two", "Three", "Four", "Five",
    		"Six", "Seven", "Eight", "Nine" };
    	private static final String[] TEENS = {
    		"Ten", "Eleven", "Twelve", "Thirteen", null, "Fifteen",
    ...
    See more | Go to post

    Leave a comment:


  • JanineXD
    replied to Reverse Number and eliminate zero
    in Java
    I still dont get it.

    I can't find a number 3 in the program and I cant find what command is used to cut off the 3 digits
    See more | Go to post

    Leave a comment:


  • JanineXD
    replied to Conver number to words (thousands) help
    in Java
    Here's the updated program:
    Code:
    package num2word;
    
    import java.util.Scanner;
    
    public class NumbertoWords {
    
        // units Method
        public static void units(int n) {
    
            switch (n) {
                case 1:
                    System.out.print("one ");
                    break;
                case 2:
                    System.out.print("two ");
    ...
    See more | Go to post

    Leave a comment:


  • JanineXD
    replied to how to link image map to iframe
    It would help if you could give us the code on your html file.

    maybe the link on the image map is like this
    <a href="link.html " target="_blank" >
    or target="new" just remove the target="new" then try clicking it again.
    See more | Go to post

    Leave a comment:


  • JanineXD
    replied to Reverse Number and eliminate zero
    in Java
    It still won't reverse:
    Code:
    import java.io.*;
     import java.lang.*;
      public class ReverseTheNumber{
          public static void main(String []args)throws IOException{
    BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
     
     
          int num;
     
        System.out.println("Reverse the Numbers:");
        num=Integer.parseInt(in.readLine());
          int len=String.valueOf(num).length();
    ...
    See more | Go to post

    Leave a comment:


  • JanineXD
    replied to Reverse Number and eliminate zero
    in Java
    oh. I figured the problem. now the process is completed, but the output is wrong, I mean the program is wrong and won't reverse the number then eliminate the zero:

    here's the NEW code:
    Code:
    import java.io.*;
     import java.lang.*;
      public class ReverseTheNumber{
      	public static void main(String []args)throws IOException{
    BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
    ...
    See more | Go to post

    Leave a comment:


  • JanineXD
    replied to Reverse Number and eliminate zero
    in Java
    Here's what the error says:
    Code:
    C:\Documents and Settings\User\Desktop\ReverseTheNumber.java:10: in is already defined in main(java.lang.String[])
        DataInputStream in= new
                        ^
    Note: C:\Documents and Settings\User\Desktop\ReverseTheNumber.java uses or overrides a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    1 error
    
    Process completed.

    ...
    See more | Go to post

    Leave a comment:


  • JanineXD
    started a topic Conver number to words (thousands) help
    in Java

    Conver number to words (thousands) help

    Hello,

    I already have the program ( convert number to words but only 0-999 ). I need it to be ( 0-9999 ).

    can you help me?

    Code:
    package num2word;
    
    import java.util.Scanner;
    
    public class NumbertoWords {
    
        // units Method
        public static void units(int n) {
    
            switch (n) {
                case 1:
                    System.out.print("one
    ...
    See more | Go to post

  • JanineXD
    started a topic Reverse Number and eliminate zero
    in Java

    Reverse Number and eliminate zero

    How's this an error? can you help me find out please.

    thanks!

    Code:
    import java.io.*;
     import java.lang.*;
      public class ReverseTheNumber{
      	public static void main(String []args)throws IOException{
    BufferedReader in=new BufferedReader(new InputStreamReader(System.in));
    
      	try
      	{
      	int num;
      	DataInputStream in= new
      	DataInputStream(System.in);
    ...
    See more | Go to post

  • JanineXD
    replied to break for loop help?
    in Java
    thank you!

    I added break; after the system.out.prin tln();
    See more | Go to post

    Leave a comment:


  • JanineXD
    started a topic break for loop help?
    in Java

    break for loop help?

    I have this program:
    Code:
    import java.io.*;
    
    public class AnyFibonacci{
    	public static void main(String[]args)throws IOException{
    		BufferedReader In = new BufferedReader(new InputStreamReader(System.in));
    		
    		for(;;){
    		
    			System.out.println("Input Test Case <Iterations StartVal_1 StartVal_2> ");
    			String l = In.readLine();
    			
    			String con[] = l.split("\\s+");
    ...
    See more | Go to post

  • thank you very much!
    See more | Go to post

    Leave a comment:


  • Thank you!

    How can I change the values because when i output its all zeros:

    0
    0 0
    0 0 0
    0 0 0 0
    0 0 0 0 0


    thanks again!
    See more | Go to post

    Leave a comment:


  • The zeros are just an example of the arrays.

    I just want to have the output like this:
    3
    5 6
    9 0 2
    3 4 1 4
    3 1 2 3 4

    can you teach me how can I get it without affecting the shape?

    thanks!
    See more | Go to post

    Leave a comment:


  • JanineXD
    started a topic Array that has this kind of graphical illustration
    in Java

    Array that has this kind of graphical illustration

    I basically need help getting this kind of illustration using Arrays:

    ex:


    3
    5 6
    9 0 2
    3 4 1 4
    3 1 2 3 4

    the variables are just examples, I just need to know how can I do that without having it like this:

    3 0 0 0 0
    5 6 0 0 0
    9 0 2 0 0
    3 4 1 4 0
    3 1 2 3 4

    Thank You!!
    See more | Go to post

  • JanineXD
    started a topic Converting for loop to while/do-while ?
    in Java

    Converting for loop to while/do-while ?

    What seems to be wrong with my program?

    Code:
    public class FooBizBaz {
    	public static void main(String []args){
    int num1;
    int num=1;
    
    num1=num <= 50;
    
    
    System.out.println(num);
    
    	do{System.out.print("foo");}
    	while((num%3)==0);
    	
    	do{System.out.print("biz"); }
    	while((num%5)==0);
    
    	do{System.out.print("baz");}
    ...
    See more | Go to post
No activity results to display
Show More
Working...