Write a java program to display multiplication table in a
Frame.
Answer / hardik viradiya
import java.awt.event.*;
import javax.swing.*;
import java.awt.Graphics;
import java.awt.*;
public class MatrixMulFrame extends Frame
{
public static void main(String[] args)
{
MatrixMulFrame fm = new MatrixMulFrame();
fm.setSize(900, 600);
fm.setVisible(true);
fm.repaint();
}
public MatrixMulFrame()
{
}
public void paint(Graphics g)
{
for(int i=1;i<=10;i++)
{
for(int j=1;j<=10;j++)
{
String str = Integer.toString(i*j);
g.drawString(str,(i*30),10+(j*30));
}
}
}
}
| Is This Answer Correct ? | 15 Yes | 12 No |
How Can I Trace A Java Program . Please Give Me Step by Step Process
write a c program which takes 20 numbers in an array as input from user and rearrange them in two different array defining even or odd
Program to print map of India in java.
How to create Date method to set the date in Ms Access
is public static void main() work in java?is "String arg[]" needed as argument?
Is it possible to define marker interface in java.If possible then how to define user defined marker interface?
Why the program getting error if we don't use String args[] in main(), even in the case of not getting any arguments from command line?
Write a java program to display multiplication table in a Frame.
write a program that will ask the user to enter a number n and display the product of all numbers from 1 to n.
In java, why do we set thread priority, when we know that there is no guarantee by which a thread should be execute?
what are the other loops except for for,while,do while and until?
inner join,outerjoin,trigger,stored procedure explain with code snippets?