how to put picture or ascii art in jframe.....
807603Nov 4 2007 — edited Nov 4 2007hi guys....., am a newbie in java, i found difficulties when am trying to put picture or an ascii art in jframe, maybe u guys can give me some hints....(based on my code),here i submit a part of my code in jframe section:...
import java.awt.*;
import javax.swing.*;
import java.awt.Color;
import javax.swing.JOptionPane;
import java.util.Date;
class MyFrame extends JFrame
{
public void paint ( Graphics g )
{
this.setBackground(Color.BLACK);
g.setColor(Color.RED);
g.setFont(new Font("Serif", Font.BOLD, 18));
g.drawString("WELCOME", 200, 50);
g.setFont(new Font("Serif", Font.BOLD, 14));
g.drawString("\n", 10, 70 );
g.drawString("Date = " + new Date(), 10, 140);
}
}