write a java program to display "hello java" with setting fonts-georgia, foreground, color red, background color blue on the frame
Answers
Answered by
1
Answer:
import java.awt.*;
class Slip7 extends Frame
{
Label l;
()
{
l=new Label("Hello java");
l.setFont(new Font("Georgia",Font.BOLD,14));
l.setForeground(Color.RED);
add(l);
setBackground(Color.BLUE);
setSize(300,300);
setLayout(new FlowLayout());
setVisible(true);
}
public static void main(String a[])
{
();
}
}
Similar questions