package javaapplication1;

public class Main {

    public static void main(String[] args) {
        //display the table heading
        System.out.print("     Multiplication Table\n");
        System.out.print("------------------------------\n");
        //Display the number title
        System.out.print("     ");
        for(int j=1;j<=9;j++)
           System.out.print("   "+j);
        System.out.print("\n");

       //Print the body of the table
        for(int i=1;i<=9;i++)
        {
            System.out.print(i+"  | ");
            for (int j=1;j<=9;j++)
            {
                if(i*j<10)
                    System.out.print("   "+i*j);
                else System.out.print("  "+i*j);
            }
            System.out.print("\n");
        }
    }
}

I'm a beginner to java and I saw in the graphics I can draw a panel ad write in it
so I wanted to write the results of multiplication in the panel.
I tried to write it in a panel but the first row only is included in it not all the table
Can anyone give me a hand??

i think your approach is wrong in writing on the panel because system.out.....is used when we have to write something on the console screen.

for u'r problem must add components on the panel like textfield, textarea to write something on it..

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.