- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
4 Posted Topics
import javax.swing.JPanel; import javax.swing.ImageIcon; import java.awt.Image; import java.awt.Graphics; import java.awt.Graphics2D; class View extends JPanel { Image icon1,icon2; public View(){ ImageIcon i1=new ImageIcon(this.getClass().getResource("tile1.png"));//image I drew ImageIcon i2=new ImageIcon(this.getClass().getResource("tile2.png"));//image I downloaded icon1=i1.getImage(); icon2=i2.getImage(); } public void paint(Graphics g){ super.paint(g); Graphics2D g2=(Graphics2D)g; g2.drawImage(icon1,10,10,null);//this image is not displayed g2.drawImage(icon2,200,200,null);//this image is displayed } } … | |
Hi Say I want to write a header file as an exercise. It will contain a bunch of functions and some constants. Q1. I noticed that the standard header files only contain the function prototypes. a> Where are the actual functions? b> How do I write a header file such … | |
Re: I have a question. In your question it states that t must be <1000 and N must be >=-1000 and <=1000. Shouldn't the program check for violation of these conditions? | |
Re: I'm interested in graphics programming. what library do I use for graphics programming in C if graphics.h is deprecated?? |
The End.