Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //In super class
- protected Image image;
- public BinaryGate(String imgUrl){
- java.net.URL url = getClass().getResource(imgUrl);
- image = new ImageIcon(url).getImage();
- this.setSize(image.getWidth(null), image.getHeight(null));
- }
- ///....in sub class...
- public ANDGate(){
- super("images/AND.gif");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement