Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 2 online users. » 0 Member(s) | 1 Guest(s) Google
|
Latest Threads |
Looking for Adventure? Fi...
Forum: Random Discussion
Last Post: iHOMEz
11-16-2024, 09:18 PM
» Replies: 0
» Views: 477
|
Prettys Womans in your to...
Forum: Random Discussion
Last Post: iHOMEz
10-30-2024, 07:45 AM
» Replies: 0
» Views: 756
|
Prettys Womans in your ci...
Forum: Random Discussion
Last Post: iHOMEz
10-26-2024, 10:50 AM
» Replies: 0
» Views: 788
|
Beautiful Womans from you...
Forum: Random Discussion
Last Post: iHOMEz
10-19-2024, 02:48 PM
» Replies: 0
» Views: 885
|
Prettys Womans in your ci...
Forum: Random Discussion
Last Post: iHOMEz
10-06-2024, 05:00 PM
» Replies: 0
» Views: 1,049
|
Womans from your city - V...
Forum: Random Discussion
Last Post: iHOMEz
07-28-2024, 10:26 AM
» Replies: 0
» Views: 1,423
|
Supreme Сasual Dating - A...
Forum: Random Discussion
Last Post: iHOMEz
06-14-2024, 11:28 AM
» Replies: 0
» Views: 1,850
|
Beautiful Womans in your ...
Forum: VB.NET
Last Post: iHOMEz
06-09-2024, 09:23 PM
» Replies: 0
» Views: 1,654
|
Hangman in Rust
Forum: Other
Last Post: brandonio21
02-04-2018, 11:14 AM
» Replies: 2
» Views: 20,649
|
How to: Search files from...
Forum: VB.NET
Last Post: brandonio21
11-25-2017, 12:55 PM
» Replies: 1
» Views: 15,963
|
|
|
Need help again... |
Posted by: bigbubblewrap - 08-19-2012, 07:28 PM - Forum: Java
- Replies (6)
|
|
In the video Making a game with Java part 3, i=I cant figure out why but its telling me "The field Component.y is not visible" here's my code:[code2=java]package levelEditor;
import java.awt.Canvas;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.Rectangle;
import java.awt.Toolkit;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.image.BufferStrategy;
public class LevelEditor
extends Canvas
implements KeyListener, Runnable, MouseListener{
private Object[][] grid = new Object[50][50];
private Graphics bufferGraphics = null;
private BufferStrategy bufferStrategy = null;
private boolean running;
private Thread thread;
public LevelEditor(Dimension size)
{
this.setPreferredSize(size);
this.addKeyListener(this);
this.thread = new Thread(this);
this.addMouseListener(this);
running = true;
}
public void paint(Graphics g)
{
if (bufferStrategy == null)
{
this.createBufferStrategy(2);
bufferStrategy = this.getBufferStrategy();
bufferGraphics = bufferStrategy.getDrawGraphics();
this.thread.start();
}
}
public void run() {
//THis is what runs when the level editor is running
while(running)
{
DoLogic();
Draw();
DrawBackBufferToScreen();
Thread.currentThread();
try
{
Thread.sleep(10);
}
catch(Exception e)
{
e.printStackTrace();
}
}
}
public void DoLogic()
{
}
public void Draw()
{
bufferGraphics = bufferStrategy.getDrawGraphics();
try
{
bufferGraphics.clearRect(0, 0, this.getSize().width, this.getSize().height);
for (int x = 0; x < grid.length; x++)
{
for (int y = 0; y < grid.length; y++);
{
Object o = grid[x][y]; //the problem line
if (o instanceof Block)
{
Block blockToDraw = (Block)o;
blockToDraw.draw(bufferGraphics);
}
}
}
}
catch(Exception e)
{
e.printStackTrace();
}
finally
{
bufferGraphics.dispose();
}
}
public void DrawBackBufferToScreen()
{
bufferStrategy.show();
Toolkit.getDefaultToolkit().sync();
}
@Override
public void mouseClicked(MouseEvent e) {
int mouseX = e.getX();
int mouseY = e.getY();
mouseX = (mouseX / 25);
mouseY = (mouseY / 25);
grid [mouseX][mouseY] = new Block(mouseX * 25, mouseY * 25);
}
public void keyPressed(KeyEvent arg0) {
}
public void keyReleased(KeyEvent arg0) {
}
public void keyTyped(KeyEvent arg0) {
}
@Override
public void mouseEntered(MouseEvent arg0) {
// TODO Auto-generated method stub
}
@Override
public void mouseExited(MouseEvent arg0) {
// TODO Auto-generated method stub
}
@Override
public void mousePressed(MouseEvent arg0) {
// TODO Auto-generated method stub
}
@Override
public void mouseReleased(MouseEvent arg0) {
// TODO Auto-generated method stub
}
}[/code2]
This was about 1/2 way thru the video.
the nasty red text said this "Exception in thread "Thread-1" java.lang.Error: Unresolved compilation problem:
The field Component.y is not visible
at levelEditor.LevelEditor.Draw(LevelEditor.java:84)
at levelEditor.LevelEditor.run(LevelEditor.java:55)
at java.lang.Thread.run(Unknown Source)
'
|
|
|
Possible C++ Basic's tutorial |
Posted by: Moldraxian - 08-17-2012, 06:06 AM - Forum: C++ Programming
- Replies (9)
|
|
Hey all! I think within the next two weeks if I can find a decent recording software that I will demonstrate the basics of using Visual C++! Of course this may be delayed due to school about to start but if anybody is really interested then I will make a video.
|
|
|
My Website on Mt.Washington in NH |
Posted by: Moldraxian - 08-16-2012, 06:07 AM - Forum: Your Sites!
- Replies (3)
|
|
This is the link to a website I made for school last year.
<!-- m --><a class="postlink" href="https://sites.google.com/site/mtwashingtonmountains/">https://sites.google.com/site/mtwashingtonmountains/</a><!-- m -->
Most of the pictures were taken by me.
|
|
|
Gaming Pros |
Posted by: Moldraxian - 08-15-2012, 08:40 AM - Forum: Gaming
- Replies (6)
|
|
Yo. I was bored and wondering if anyone plays Starcraft 2, Battlefield 3, Diablo 3. I play BF3 on PS3 and PC. Minecraft as well.
Still got my WoW account but I haven't played in atleast 5 months due to boredom.
|
|
|
Help with web browser please... |
Posted by: PNG - 08-13-2012, 11:40 PM - Forum: Programming Help
- Replies (1)
|
|
I am trying to make a web browser but am having some trouble because some sites wont work with it due to it not having flash... Could someone please tell me how to resolve this issue.
|
|
|
|