Jump to content

Sniffy

Members
  • Posts

    403
  • Joined

  • Last visited

Everything posted by Sniffy

  1. Hey everyone, it is just me stopping in again to say "hi". I kind of forgot about this forum when I started getting into Java and object oriented programming in general. I am on my way to success in programming, messing with OpenGL bindings like Xith3D and JMonkey. I came across C# being able to make web applications with ASP.NET in a book that I was reading. If I look into it more, this forum just may be of some use to me once again.
  2. Sniffy

    Where are you?

    Neat web appletw3schools is global
  3. I thank you for all of the help you've given me with PHP and MySQL and I would recommend you to other users.

  4. Also, here is another one of my past creations:aApplet.java import javax.swing.*;import java.awt.*;public class aApplet extends JApplet{ Container con = getContentPane(); String speech = " Duis nec lectus. Etiam aliquet, nulla non elementum"; String speech2 = "aliquam,libero urna rhoncus eros, vel luctus"; String speech3 = "tellus urna at mauris. Sed tincidunt consequat"; String speech4 = "erat. Nulla facilisi. Cras varius. Suspendisse"; String speech5 = "posuere turpis ac sem. Phasellus vulputate"; String speech6 = "commodo lacus.\n Sed auctor. Aliquam venenatis"; String speech7 = "tellus eget dolor. Sed risus."; public void start(){ repaint(); } public void paint(Graphics gr){ gr.drawRoundRect(9, 9, 301, 151, 20, 20); gr.setColor(Color.CYAN); gr.fillRoundRect(10, 10, 300, 150, 20, 20); gr.setColor(Color.BLACK); gr.drawString(speech, 20, 25); gr.drawString(speech2, 20, 40); gr.drawString(speech3, 20, 55); gr.drawString(speech4, 20, 70); gr.drawString(speech5, 20, 85); gr.drawString(speech6, 20, 100); gr.drawString(speech7, 20, 115); gr.fillRect(40, 140, 200, 10); }}
  5. Does anyone have a tutorial on nested classes, I've been meaning to look into it.
  6. Check out my latest creation.... do you like it?Instructions:Install SDK: http://java.sun.comCreate new file: ExampleJFrame.javaInsert Code: import javax.swing.*;import java.awt.*;import java.awt.event.*;public class ExampleJFrame{ public static void main(String[] args) { JButton press = new JButton("Show"); JButton press2 = new JButton("Hide"); JButton press3 = new JButton("Clear"); final JFrame frame = new JFrame("Example"); JFrame frame2 = new JFrame("Menu"); frame.setSize(200, 200); frame.setResizable(false); frame.getContentPane().setLayout(new FlowLayout()); frame.show(); frame2.setLocation(200, 0); frame2.setResizable(false); frame2.addWindowListener(new WindowAdapter(){ public void windowClosing(WindowEvent e) { System.exit(0); } }); frame2.setSize(200, 200); frame2.getContentPane().setLayout(new FlowLayout()); frame2.getContentPane().add(press); frame2.getContentPane().add(press2); frame2.getContentPane().add(press3); frame2.show(); press.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { frame.setVisible(true); } }); press2.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { frame.setVisible(false); frame.getContentPane().add(new JLabel("" + frame.getLocation())); } }); press3.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { frame.setVisible(false); frame.getContentPane().removeAll(); frame.setVisible(true); } }); } } Command Prompt: OpenType commands:javac ExampleJFrame.javajava ExampleJFrame.javaWhat do you think?What it does:Use the "Menu" frame to either "Show", "Hide", or "Clear" the JFrame "frame2" of content. Content is added each time "frame2" is shown. It displays its current location (x,y) on the screen with the java.awt.Point class.somethings wrong with my PC so i can't supply a preview at the moment
  7. Sniffy

    Java Applets

    Yes, that's what i'm aiming for, a chat program when I complete basic and intermediate courses.StringBuffer[] msg = new StringBuffer[30]; for(int x = 0; x < msg.length; x++) msg[x] = new StringBuffer("");
  8. Sniffy

    JApplet Game

    Hello, I've been working on an applet that is supposed to be a "Catch the Clown" style game. When the user clicks on the button, a new random location is set and the score is incremented. Anyways, I can't get the setLocation() method to work for my JButton, any help?It might have something to do with the FlowLayout object because FlowLayout sorts Components in rows, but I don't know what other alternatives I can use. I just need to get to know JComponents and JApplets (methods) more so help would be appreciated. /** * @(#)appletGame.java * * * @author * @version 1.00 2007/3/3 */import java.awt.*;import java.awt.event.*;import javax.swing.*;public class appletGame extends JApplet implements ActionListener { Container con = getContentPane(); JButton press = new JButton("Press"); int score = 0; JLabel dispScore = new JLabel("Score:" + score); public void init() { con.add(dispScore); con.add(press); press.setLocation(10, 10); press.setLocation(100, 100); press.addActionListener(this); con.setLayout(new FlowLayout()); } public void actionPerformed(ActionEvent e) { int locationX = (int) Math.round(Math.random()*300); int locationY = (int) Math.round(Math.random()*300); score++; dispScore.setText("Score: " + score); press.setLocation(locationX, locationY); } }
  9. On the column where it shows all of the user entries, it would be great to say who it was submitted by.Test by Sniffy^^Something like that
  10. http://www.aspnetguy.com/portfolio.htmlI've noticed that when I press the "quote" slider button, the logo and navigation go slightly out of alignment.
  11. I started at Piczo as well... go figure....
  12. The menu links aren't that great.Change it to a black with no text-decoration, and add an underline when the user hovers over one of the links.
  13. User sign-up with "favorites" links in the CP would be cool.Also a suggestion center.
  14. Whoa, You've been into Web-Design for quite a while. I've only been into web-design for just over a year now.
  15. Did it say what kind of file it was?
  16. Sniffy

    Icon

    I mean I bring the picture that I scanned into a program like Flash, then select say.. the brush tool. Then I take the brush tool zoom into the layer, make a new layer, then trace the drawing with the brush tool that I scanned.
  17. ActionScript is similar to Java, yet nonetheless like JavaScript. It really is OOP, but you can look at it like procedural programming, although for advanced programmers opening up their minds to the whole OOP thing would create a lot of possibilities in ActionScript.http://www.adobe.com/support/flash/action_...nary/index.html
  18. Yeah, I was thinking it might be from a bigger script.
  19. Cool.I found all seven of the sites.It's coming along great but it needs a lot more sites.
  20. Is this part of the code or the full code?It looks like some sort of a reserved keyword from a script.
  21. The next thing you need is a template though.No offense, but it's kind of bland.
  22. Sniffy

    Gobby

    Whoa, Gobby seems very interesting.
×
×
  • Create New...