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 |
Program to print map of India in java.
what is runtime class?
Why we r using String args[] in main() even though v r not passing any arguments in command line?
1+(2*3)+(4*5*6)+(7*8*9*10)+... specified input value
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 program to convert a decimal number to binary form?
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.
I am trying to pass the string firstName from a Servlet called SampleServet. I am running this on eclipse and it tells me that "the value for annotation attribute must be a constant expression. I don't understand why it is giving me this error. @PersonAnnotation(name = SampleServlet.firstName) public class AnnotationClass{
Is there any static classes are in java give some examples
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?
Is it possible to define marker interface in java.If possible then how to define user defined marker interface?
How to create Date method to set the date in Ms Access