This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - Munchor
Pages: 1 ... 22 23 [24] 25 26 ... 424
346
« on: August 18, 2011, 01:03:36 pm »
Thanks nemo! I have this now:
Runner.java
public class Runner { public static void main(String[] args) { new Game().run(); } }
Game.java
import java.awt.Graphics2D;
import javax.swing.JFrame; import javax.swing.JPanel;
public class Game extends JPanel { JFrame mainFrame = new JFrame("Game"); public Game() { mainFrame.setSize(800, 600); } public void run() { mainFrame.setVisible(true); } public void paintComponent(Graphics2D g) { super.paintComponent(g); g.drawLine(5, 5, 10, 10); } } Right now, my only question is adding the Graphics to the Game Panel. Thanks!
347
« on: August 18, 2011, 12:57:35 pm »
I wonder how nobody noticed it, but either way, it's terrible!
348
« on: August 18, 2011, 12:45:32 pm »
Nemo, what if I use Graphics instead of Graphics2D? The example you gave me is good, but the problem is I need my code organized in separate files, I am expecting this to be a rather large project.
Thanks for the quick response too!
349
« on: August 18, 2011, 12:25:15 pm »
I was just trying to add Graphics2D to a Frame this way: Game.javaimport java.awt.Component;
public class Game { public static void main(String[] args) { MainFrame mainFrame = new MainFrame(); MainGraphics mainGraphics = new MainGraphics(); mainFrame.getContentPane().add(mainGraphics); } } That file contains the main function, where I create a new frame and a new graphics (both classes made in separate files), and then I try to add the graphics to the frame. The problem is, though, I get: Exception in thread "main" java.lang.Error: Unresolved compilation problems: Cannot instantiate the type MainGraphics The method add(Component) in the type Container is not applicable for the arguments (MainGraphics) I can only add components to frames and content panes. So I tried to make mainGraphics a component, like this: Component mainGraphics = new MainGraphics(); However, I get (in this line): Exception in thread "main" java.lang.Error: Unresolved compilation problems: Type mismatch: cannot convert from MainGraphics to Component Cannot instantiate the type MainGraphics Does anybody know how to solve this? Thanks! Also, MainGraphics is an abstract class, here's its code: import java.awt.Graphics2D;
public abstract class MainGraphics extends Graphics2D { public MainGraphics() { this.create(); this.drawLine(5, 5, 10, 10); } }
350
« on: August 18, 2011, 04:29:55 am »
I didn't see that coming after Sir returned to being a CoT. I also think it's fair that his account gets delete, what he did was really bad.
Regarding what happened to the IRC channel, I don't really know because I was not there, but I don't mind the move to OmniNET, I actually think it's much better than EFNet for the bots and such.
351
« on: August 17, 2011, 08:22:28 am »
Looking great hoffa! I'd love some project like this, I have no idea of how you managed to make it too.
352
« on: August 17, 2011, 07:09:32 am »
I had Denmark and Koala. So Denmark and Kangaroo, that was close.
354
« on: August 16, 2011, 03:52:54 pm »
Is that the source attached or is it an executable?
It's *just* the source
355
« on: August 16, 2011, 02:54:36 pm »
You can still play the games on an emulator, and some of them, like DT's work in the document player.
I think all of them work in the Document Player.
356
« on: August 16, 2011, 02:16:30 pm »
Btw, on mac, it complains because there is no valid x64 arch executable included
Did you read the topic name? @Jim, I will try and add Drag/Drop support too, thanks for suggesting!
357
« on: August 16, 2011, 01:22:07 pm »
Great work! Just a suggestion, though: to make it look better, move the "TNS Filename" input box so it lines up horizontally with the one above it, and extend both to the end of the window.
Thanks for the suggestion! I already made it:
358
« on: August 16, 2011, 12:30:43 pm »
mm. Well, too late now
By the way, remember you can always play it online here! Half my time was spent on making it compatible with the online player, and I don't want that to go to waste
Well, I can't play it there It's Windows/Mac OS only. I think, though, that it should be played on calculators (Real hardware) when judged.
359
« on: August 16, 2011, 12:28:03 pm »
Well Adriweb, I'm not Juju but I don't know how "legal" it is to submit an entry after the time is over. I have, though, played the game and it looks good, nice job.
360
« on: August 16, 2011, 10:16:41 am »
After Adriweb made a Mac Application to make it easier to use Luna with a simple GUI interface, I decided to make a Linux version together with Spyro. Mine uses Python and wxPython, and below is a screenshot of it on Ubuntu 11.04: Note, though, that in order to use this tool, you need "luna" on the same directory as the attached file. Luna was made by ExtendeD, so it's not attached with LunaGUI. To run LunaGUI, you need Python 2.6 or Python 2.7 and wxPython 2.8.
Pages: 1 ... 22 23 [24] 25 26 ... 424
|