Jump to content

Voqus

Members
  • Posts

    688
  • Credits

  • Joined

  • Last visited

  • Feedback

    0%

Everything posted by Voqus

  1. As i said, one guy asked me on how to do it on java and i made it. Beginners could find it usefull.
  2. Hello there, i got a question from a guy on another forum about how can u redirect to a page from button click in swing. So i made it a little more advanced, with another textfield that takes the text u've typed and opens ur browser to the address u have entered. Also, writing "www." or not its the same thing on this code. So here it is: package java.swing; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JTextField; /** * @author Voqus */ public class OpenBrowser extends JFrame { public OpenBrowser(){ setTitle("Open Browser"); setLayout(new FlowLayout()); final JTextField txt = new JTextField(20); JButton button = new JButton("Redirect"); button.addActionListener(new ActionListener(){ @Override public void actionPerformed(ActionEvent e) { try { if(txt.getText().isEmpty()){ System.out.println("Are you idiot? Add ur address."); } else if(txt.getText().startsWith("www.")){ Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + txt.getText().trim()); } else Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + "www." + txt.getText().trim()); } catch (IOException e1) { e1.printStackTrace(); } } }); add(txt); add(button); pack(); setVisible(true); } public static void main(String[]args){ new OpenBrowser(); } } Credits: Me
  3. A little tip. You may think that maths wouldn't be a problem since u decided to become a programmer but... You see, you're totally wrong. (i was wrong as well :o) When i came up with the idea of creating my own game engine i've had a lot of trouble coding the Camera functions because i just didn't know the proper maths for it. Anyway, ill skip the chiti-chat. Here's a part of a code that needs MATH knowledge in order to move forward(w/ camera): It's actually spherical coordinates maths (A camera is like a coordinate system means its composed of 3 vectors X, Y and Z) double xMovement = magnitude * Math.cos(pitch) * Math.cos(yaw); double yMovement = magnitude * Math.sin(pitch); double zMovement = magnitude * Math.cos(pitch) * Math.sin(yaw); Being a programmer ain't so easy afterall. Hope you get what i mean. GL 8)
  4. Actually the topic u linked is kinda old so i dont recommend to keep searching there. It sure is usefull though for projects from C4~Freya. H5 Links: Core: http://svn.l2jserver.com/branches/unstable/ DP: http://svn.l2jdp.com/branches/unstable/
  5. A fast one since i told u that id make one.
  6. i'll make you one in some minutes, doing kartia 90.
  7. Here's a quick try: PS: needs some fixes but no time atm.
  8. Well, i'm coding in JAVA, C++ but mainly in Java. Reason? maybe its because u can handle the GUI way easier/better in java than any other programming language(imo). So this time my code challenge is to create my own java layout manager and put it to use. Previous works was... uhm.. lemme see... Avora Messenger(a.k.a msn clone : challenge for udp/tcp packages(call action, pm and stuff), Game engine (camera mode, cellpaths you know like the one that l2 uses.. tho i stopped it (not much interested after a part)), 3D game w/ JME3 engine (thought i lacked gfxers and stuff so.. i stopped at the npc table coding)) That's all, i think. Edit: Oh i didnt mention the l2j thinggies, but no biggie.
  9. thats like aion? are u blind or smt? id say its close to lord of the rings or smt
  10. Actually, i already sent you a pm about that: Plus, i didnt rip any code or anything, i coded it myself. Afterall if u didnt want ur idea to be ripped then do not -beep-ing talk about it? PS: why would i even join ur pro team that its trying to do such a `complicated` system in 2 days or so?
  11. Well, since i never really asked someone to make me a sig it was about time i requested one. ^^ So here's my request, Theme: Assassin(not real one) OR Vampire(not real one) Text: Voqus Subtext: not something specific, if u wanna add do it, otherwise is fine.
×
×
  • Create New...