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 to create and run runnable jar file of a Java Project.
4 Answers HCL, TCS, Tech Mahindra, US Consulate, Wipro,
Is there any static classes are in java give some examples
does anyone know the code to display a triangle using a applet?
what is runtime class?
Write a java program to display multiplication table in a Frame.
Is it possible to define marker interface in java.If possible then how to define user defined marker interface?
For printing a message we use System.out.println in normal programs. We use String msg="text....."; Can't we use String msg=" " in normal programs and System.out.println("........") in applets. Please answer this question?
Program to print map of India in java.
write a program that will ask the user to enter a number n and display the product of all numbers from 1 to n.
How to create Date method to set the date in Ms Access
In java, why do we set thread priority, when we know that there is no guarantee by which a thread should be execute?
write a program in java to find the moving average of all prime numbers between 2 and 100.