immeraufdemhund's Profile
Reputation: 79
Whiz
- Group:
- Active Members
- Active Posts:
- 496 (0.43 per day)
- Joined:
- 29-March 10
- Profile Views:
- 3,126
- Last Active:
Yesterday, 06:17 PM- Currently:
- Offline
Previous Fields
- Country:
- US
- OS Preference:
- Windows
- Favorite Browser:
- Chrome
- Favorite Processor:
- AMD
- Favorite Gaming Platform:
- PC
- Your Car:
- Honda
- Dream Kudos:
- 0
Posts I've Made
-
In Topic: Opensource No-pay Web & Winforms project
Posted 18 May 2013
not a bad idea. I do plan on doing it all on my own time, and have already started on a small portion of it. If i do end up selling it to them I can always donate to contributors via paypal a certain percentage based on percentage of code contributed. But the project is already posted on Github and is open source.
One question that perplexes me is that I am using VS 2012 pro which i got from their MSDN subscription.... I know I could just as easily get the VS2012 express and do the same work there, but does me using this IDE still make it theirs? -
In Topic: Minesweeper...why!?
Posted 11 May 2013
CaseyJava, on 11 May 2013 - 10:54 PM, said:...named 1.bmp 2.bmp etc so idk why that wouldnt work either.
In your code it showed that you were looking for .gif. that is one problem. The second is that java ImageIcon does not read in a .bmp. as the quote shows it only supports gif, jpeg and png
Quote
ImageIcon(byte[] imageData, String description)
Creates an ImageIcon from an array of bytes which were read from an image file containing a supported image format, such as GIF, JPEG, or (as of 1.3) PNG. -
In Topic: Minesweeper...why!?
Posted 11 May 2013
AH HA i think i found it
@Override public void paint(Graphics g) { int cell = 0; int uncover = 0; all_cells = rows * cols; field = new int[all_cells]; //img = new Image[NUM_IMAGES]; //this destroys what was just created
I now see a bunch of empty squares (i found 12 minesweeper gif's on the internet and made my own resources) also change this code to this
public board(JLabel statusbar) { this.statusbar = statusbar; img = new Image[NUM_IMAGES]; for (int i = 0; i < NUM_IMAGES; i++) { String name = String.format("%d.gif", i); URL url = this.getClass().getClassLoader().getResource(name); if (url != null) { img[i] = new ImageIcon(url).getImage(); } } -
In Topic: Minesweeper...why!?
Posted 11 May 2013
sometimes a fresh pair of eyes and a step away is all that is needed. Some of my best code fixes are after a trip to the John or to go talk with someone for a few minutes. In fact that was one of the tips I read in a book. If you are stuck with a seemingly easy problem that is just escaping you explain the problem out loud to a non-technical person. The reason is that it forces you to explain everything in crazy detail but it also forces you to think about every line of code. One person who didn't have access to another human being used a rubber duck... This makes me laugh but it really does work.
If I make another suggestion that will help you is to refactor your code. It is in desperate need of it. -
In Topic: Minesweeper...why!?
Posted 11 May 2013
public void Board(JLabel statusbar)
that is a method of yours to kick everything... but where is it being called?
Answer = no where. so how do you expect it to show anything?
I would say you need to fix this
public Mines() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setSize(WIDTH, HEIGHT); setLocationRelativeTo(null); setTitle("Minesweeper"); statusbar = new JLabel(""); add(statusbar, BorderLayout.SOUTH); add(new board(statusbar)); setResizable(false); setVisible(true); }
and this
public board(JLabel statusbar) { this.statusbar = statusbar; img = new Image[NUM_IMAGES]; for (int i = 0; i < NUM_IMAGES; i++) { img[i] = (new ImageIcon(this.getClass().getResource((i) + ".bmp"))).getImage(); } setDoubleBuffered(true); addMouseListener(new minesadapter()); newGame(); }
My Information
- Member Title:
- D.I.C Regular
- Age:
- 30 years old
- Birthday:
- March 31, 1983
- Gender:
-
- Location:
- Rolling Prairie, IN
- Full Name:
- Robert Snyder
- Years Programming:
- 10
- Programming Languages:
- Java, C#, C++, SQL
Contact Information
- E-mail:
- Click here to e-mail me
- AIM:
-
Compaq31
- MSN:
-
immeraufdemhund@hotmail.com
- ICQ:
-
6741158
- Yahoo:
-
immeraufdemhund@yahoo.com
- Skype:
-
immeraufdemhund
Friends
|
|


Find Topics
Find Posts
View Reputation Given

|
Comments
immeraufdemhund has no profile comments yet. Why not say hello?