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 |
Design a program using one-dimensional array that determines the highest value among the eight input values from a user. Display the difference of each value from the highest to the lowest.
does anyone know the code to display a triangle using a applet?
In java, why do we set thread priority, when we know that there is no guarantee by which a thread should be execute?
inner join,outerjoin,trigger,stored procedure explain with code snippets?
what are the other loops except for for,while,do while and until?
1+(2*3)+(4*5*6)+(7*8*9*10)+... specified input value
Why we r using String args[] in main() even though v r not passing any arguments in command line?
write a program in java to find the moving average of all prime numbers between 2 and 100.
A game that has five levels of play has the score for each level stored in an array. You are to write a program that goes through that array and finds: a) the minimum score, and the level at which it occurred b) the maximum score, and the level at which it occurred c)the average score for all five levels The score data you must use for this program are as follows: Game Level Score 1 450 2 316 3 148 Stack implementations is mandatory.
Can we run Applet in Web browser with security policy files
Write a java program to display multiplication table in a Frame.
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