Write a java program to display multiplication table in a
Frame.



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 ?    14 Yes 12 No

Post New Answer

More J2SE Code Interview Questions

How can we get the details for printing the employee details at run time using JDBC connectivity? can u provide the coding for that? Its urgent?

2 Answers  


1+(2*3)+(4*5*6)+(7*8*9*10)+... specified input value

1 Answers   MAQ,


How to create Date method to set the date in Ms Access

0 Answers  


write a program in java to find the moving average of all prime numbers between 2 and 100.

0 Answers  


Can we run Applet in Web browser with security policy files

0 Answers  






How Can I Trace A Java Program . Please Give Me Step by Step Process

1 Answers   IBM,


what is runtime class?

0 Answers   MAQ,


Why we r using String args[] in main() even though v r not passing any arguments in command line?

2 Answers  


write a program that inputs two real numbers then exchanges their values.

7 Answers   Infosys,


Is there any static classes are in java give some examples

0 Answers  


what are the other loops except for for,while,do while and until?

0 Answers   Aricent,


Write a program to convert a decimal number to binary form?

1 Answers   Oracle,


Categories