No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
24 Posted Topics
Hey guys, I wasn't really certain which category this question fell under, so I chose CS with it being the broadest. I was recently given a text file and told that it could be converted into an image. The text file looks like this... 0000000 d8ff e0ff 1000 464a 4649 … | |
Ideally my program should work like this... Upon button click a random message (out of 3 messages) is appended to a text area(or pane, etc). One message should display blue, one green and one red. Currently I am using JTextPane. I have figured out how to append text easily but … | |
Here is the code for my login page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Login</title> <style type="text/css"> #apDiv1 { position:absolute; width:200px; height:115px; z-index:1; left: 608px; top: 201px; } #apDiv1 form table tr td { font-family: "Trebuchet MS"; } </style> </head> … | |
Hey. So here is my code... config.php <?php $localhost = "localhost"; $dbuser = "root"; $dbpass = ""; $dbname = "test2"; $connect = mysql_connect($localhost, $dbuser, $dbpass); mysql_select_db("$dbname", $connect); ?> regprocess.php <?php include"config.php"; $username = $_POST['username']; $email = $_POST['email']; $password = md5($_POST['password']); $insert = 'INSERT into users(username, email, password) VALUE("'.$username.'","'.$email.'","'.$password.'")'; mysql_query($insert); ?> … | |
There are x number of users. Every time a user clicks a button, they give another random user a high-five. They get rewarded for giving the other user a high 5, and there is then an increase in the potential for them to receive a high five from others. Each … | |
I created a simple game in java. Could someone please link me to a tutorial or give me a basic run through on how to let other users connect and how to save their experience, etc... Peace and love, oldezwe | |
Here is my code... [CODE]import java.sql.Connection; import java.sql.DriverManager; import java.sql.Statement; public class example1{ public static void main(String[] args) { try { Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/test","user","password"); Statement state = (Statement) con.createStatement(); String username = "John"; String password = "John1"; int experience = 0; int level = 1; String insert = "INSERT … | |
Below is what I have been attempting to do. [code]retrive number of rows from MySql table; for(int i = 1; i <= numberOfRows; i++){ retrive userID, level at position(i) in table; // next i need to insert userID into array, level amount of times (ex. userID = 4, level = … | |
I am attempting to take 2 integers from a MySql table. X represents a number that will be stored into an array. Y represents the number of times that X will be put into the array. I am attempting to make a loop that will go through, find all the … | |
once I have requested my result set from my server, how do i store it as the variable that I want it to be? EX. [CODE]ResultSet rs2 = st.executeQuery("select userIDnum from userInfo where username = '"+username+"'");[/CODE] how do i then save userIDnum as an integer to use in my program? | |
I'm having a hell of a time trying to make a login form. This is what I have at the moment.... [CODE]import javax.swing.*; import java.sql.*; import java.awt.*; import java.awt.event.*; class LoginDemo extends JFrame{ JButton SUBMIT; JLabel label1,label2; final JTextField text1,text2; LoginDemo(){ setTitle("Login Form"); setLayout(null); label1 = new JLabel(); label1.setText("Username:"); text1 … | |
Is there anyway for me to close a tab/window of my default browser from my java application? | |
here is a snippet from my code, my jbutton action listener [CODE]private void jButton1_actionPerformed(ActionEvent e) { System.out.println("\njButton1_actionPerformed(ActionEvent e) called."); String username = new String(jTextuser.getText()); String password = new String(jTextpass.getText()); String passwordconfirm = new String(jTextpassconfirm.getText()); String email = new String(jTextemail.getText()); String emailconfirm= new String(jTextemailconfirm.getText()); if(username.equals("") || password.equals("") || passwordconfirm.equals("") || email.equals("") … | |
I am using this code in a jbutton to open a webpage from my java application. [CODE] try { //Set your page url in this string. For eg, I m using URL for Google Search engine String url = "http://www.google.com"; java.awt.Desktop.getDesktop().browse(java.net.URI.create(url)); } catch (java.io.IOException e) { System.out.println(e.getMessage()); } [/CODE] Though, … | |
I've found really good information/tutorials online for writing from my java application to my MySQL database. Can someone direct to one on retrieving information from my database to store as variables in my application? Thanks Peace and love, oldezwe | |
I do not know how to do this and can not find how on google. I want to add code to my action listener to disable a jButton after it is clicked an then enable it again after x amount of time. anyone know how to do this? | |
i am using java, how do i get the database to tell me how many elements are in it and save that as an integer | |
I want to embed a native browser(chrome, firefox, IE) inside of my jframe. I've been trying to figure out how to do this and only this for weeks and have not been able to figure it out. Can someone please provide me with a tutorial. | |
I've seen this done before. I'm pretty sure its done with JDIC, does anyone have example code of this? I'd really like to know how to do this. Thanks | |
part of the program i am creating requires me to print out all of the links from a desired webpage. I have absolutely no idea on how to go about this. help? thanks | |
-List of names in a database -names have double assigned to them, x -each name has random 10 digit double generated from 0 to x -the name with the highest number double is assigned to a variable -if two names generate the same double then the name with in the … | |
how do i add a scrollbar to my JEditorPane this is the format i have everything in. [CODE]private JEditorPane tos; tos = new JEditorPane(); tos.setEditable(false); tos.setForeground(new Color(250, 250, 250)); tos.setBackground(new Color(84, 84, 84)); tos.setText("fuuuuuuuuuuuuuuuuuuuuuuuuu bbbarrrrrrrrrrrrrrrrrrrrrrrrr"); addComponent(contentPane, tos, 500,180,210,170); [/CODE] | |
I've been creating a login system in Java. The functionality of all the programming in java has been a breeze. Though, I can't find any good comprehensive tutorials on creating a login database, which is something I have never done before. [B]Could someone please give me or link me to … | |
Hey, I'm fairly new to java. I was hoping someone could give me a pseudo code like description of what I'm trying to do so I know where to start my researching. In my program: -Users will register a username, password, and weblink to their account. -There will be restrictions … |
The End.