Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
Unknown Quality Score

No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.

0 Endorsements
Ranked #2K
~26.7K People Reached
Favorite Tags

41 Posted Topics

Member Avatar for kay19

This is pretty simple code but I see some errors here and there. Are you trying to calculate the averages and grade in a seperate method or all in the main method? For the average calc method it should look like this: public static double calculateAverage(double Test1, double Test2, etc.) …

Member Avatar for foxtich
0
3K
Member Avatar for Slyvr

I just added a pause button to my game, using most of this code: [URL="http://msdn.microsoft.com/en-us/library/bb195026%28v=xnagamestudio.31%29.aspx"]http://msdn.microsoft.com/en-us/library/bb195026%28v=xnagamestudio.31%29.aspx[/URL] For some reason it changes the Window.Title to "[GameName] - Paused" and even though it's unpaused it still says paused in the title. I never told it to change the title so I guess it …

Member Avatar for Akill10
0
155
Member Avatar for hhagood

What Jeff said. You'll need to read into getting input, declaring variables (such as a String array), using arrays, and outputting results. We won't do your homework for you.

Member Avatar for Ezzaral
0
451
Member Avatar for Slyvr

I have a web project I've been working on in my free time using mostly jsp. It's currently set up so that if a user clicks the login button it takes them to a check-login servlet which will return whether it's a valid login or not through a session.setAttribute("loginstatus","Valid"). Everytime …

Member Avatar for catherine sea
0
81
Member Avatar for Slyvr

I made a basic JUnit test to set up this oracle database on my computer with hibernate. The database works and everything, but trying to hook it up to Hibernate is proving to be a challenge. My config file is below: [code] <hibernate-configuration> <session-factory> <!-- Database Connection Properties --> <property …

Member Avatar for Slyvr
0
1K
Member Avatar for Onlineshade

This is why I'm glad my first java professor taught java with the console to start out

Member Avatar for Onlineshade
0
291
Member Avatar for Slyvr

I'm not sure how it's done, but I need a link to change an attribute so that the main content page can get the attribute and then display the appropriate content. My following code does not work...and it always seems to include home.jsp no matter what (home is set from …

0
97
Member Avatar for Slyvr

I'm completely new to JSP but not Java [CODE]<div> <%@ page import="java.util.*" %> <%= Date date = new Date(); out.println(date.getHours()+":"+date.getMinutes()+":"+date.getSeconds()); %> </div>[/CODE] All I need is [CODE]Hour:Minute:Second[/CODE]. (Edit: stupid emoticons) I'm getting this error on Date [CODE]Multiple annotations found at this line: - Syntax error, insert ")" to complete MethodInvocation …

Member Avatar for Slyvr
0
229
Member Avatar for Murprogrammed

Try C# and XNA Game Studio. I'm building a simple 2D rpg game right now and it's not hard at all with a java background

Member Avatar for adcgv
0
153
Member Avatar for Slyvr

I keep getting the IndexOutOfRangeException for my XNA game and after printing the indexes it stops at 600. Is that the max limit for arrays in C#? I'm trying to get all of the pixels from an 800x600 image into an array so I can test when a R:20 G:20 …

Member Avatar for Momerath
0
270
Member Avatar for Slyvr

I have 2 classes. One get/set BlockData, and one main class that loads,draws,updates. I have a big list of public Texture2D types that I have in the main class. I need blockdata to be able to get the texture2d types for each block and send it back to main...but blockdata …

0
71
Member Avatar for PHIPH

I've always used Eclipse and I don't think it's hindered my ability to learn java at all

Member Avatar for jwenting
0
181
Member Avatar for Slyvr

I just started teaching myself some basic things with this, but the simplest shit like strings seems impossible. Does anyone know any good sources, tutorials, or anything that might help me more? As an example...I wrote this code to tell when a control button was pressed: [CODE]//ProcessKeys int key; string …

Member Avatar for Slyvr
0
226
Member Avatar for Slyvr

I'm making a game in XNA. I need a player to move from block to block (40x40pixels) and I need to be able to set the speed that the player is able to move at. Right now, I have this code: Update Method - updates 60 frames per second or …

Member Avatar for Momerath
0
198
Member Avatar for Slyvr

I'm creating a game with XNA, and having issues with Vector2 arrays. The code below will loop through each square on the grid for the game 40x40pixels. The first for loop getting the X coordinate and the second getting the Y coordinate. I'm getting the proper width and height (if …

Member Avatar for Sodabread
0
142
Member Avatar for chad33

4. Outputs all the numbers that when squared are between 1 and 10. So if firstNum is greater than 3 there won't be any numbers that when squared are between 1 and 10. for (int i=0; i<totalnumbers; i++){ squarednumber = number*number; if ((squarednumber>=1) && (squarednumber<=10)){ System.out.println(squarednumber); } }

Member Avatar for Slyvr
0
316
Member Avatar for rjdelight
Member Avatar for xcamp
Member Avatar for rjdelight

You've already posted this and you really should figure out the GUI code for yourself instead of using Netbeans automatic thing. It's hard to read your code with all of Netbeans' weird jumbled up mess of stuff

Member Avatar for mKorbel
0
1K
Member Avatar for zach&kody

[QUOTE=JamesCherrill;1526131].jar files are just .zip files with some conventions about what's in them. A full description is on the Oracle java web site. You can edit them with your favourite zip file utility.[/QUOTE] Doesn't unzipping just show the .class files though? I'm curious how you decompile a class file back …

Member Avatar for JamesCherrill
0
980
Member Avatar for Slyvr

When I run my program, sometimes it shows up and sometimes it just shows a blank frame. Is this because it's having trouble loading the canvas/buttons and all that stuff...aka do I need a loading screen and how do I do one in java?

Member Avatar for JamesCherrill
0
103
Member Avatar for Slyvr

I have my code set up so I can 1)select what image and 2)the coordinates of the mouse click where the image is going to be placed. What it currently does it place the right image in the right coordiantes but if I click again somewhere else, it replaces the …

Member Avatar for Slyvr
0
126
Member Avatar for sirlink99
Member Avatar for rjdelight

Your code a bit jumbled, but I'll just write out what's necessary for what you need. [CODE]File file = new File(filename); BufferedReader reader = null; try { reader = new BufferedReader(new FileReader(file)); String text = null; String savetext=null; while ((text = reader.readLine()) != null) { savetext += text } textarea.setText(savetext); …

Member Avatar for sirlink99
0
3K
Member Avatar for sirlink99

[url]http://www.rgagnon.com/javadetails/java-0205.html[/url] This might help, but I just wanted to say minecraft ftw

Member Avatar for mKorbel
0
78
Member Avatar for Slyvr

[CODE]PointerInfo a = MouseInfo.getPointerInfo(); Point b = a.getLocation(); int x = (int) b.getX(); int y = (int) b.getY(); System.out.print("Y: "+y); System.out.print("X: "+x+"\n");[/CODE] Right now I'm using this, but it gives me the coordinates relative to the entire monitor. Since you can move the program frame anywhere on the monitor, this …

Member Avatar for Slyvr
0
4K
Member Avatar for lu25

hexAdd[positionNum] = Integer.parseInt(diskScanner.nextLine()); Is this what you're looking for?

Member Avatar for Slyvr
0
180
Member Avatar for Slyvr

This is my first time trying to use KeyListener and I just need it to move an image over 20 px every time I press the right arrow key. After 400px, it should move down to the next line vertically 'playery.' For Some reason it prints out the console output …

Member Avatar for Slyvr
0
135
Member Avatar for jasperFernandes

[CODE]String stringname = textfield.getText(); JOptionPane.showMessageDialog(null, stringname);[/CODE]

Member Avatar for mKorbel
0
2K
Member Avatar for jokers6

[QUOTE]if they picked 10 for the first question ( how many questions they want) then i have to do the math game 10 times .. i cant figure that out ![/QUOTE] [CODE] for (i=0; i<10; i++){ //math game code } [/CODE] Also, do your random generators work? I usually add …

Member Avatar for Slyvr
0
151
Member Avatar for Slyvr

How do you determine what the main hard drive is? This is what I have: [CODE]filename="savefile2.txt";[/CODE] and this is pseudocode for what I want: [CODE]filename="MainDrive:/JavaProject/savefile2.txt";[/CODE] My problem with it is, what if C: isn't the name of a person's hard drive? F:\ for instance. And also, if the folder name …

Member Avatar for java_programmer
0
151
Member Avatar for mihir3646

You need to use Scanner to scan for input from the console. Should be a quick google search.

Member Avatar for java_programmer
0
126
Member Avatar for Sheena26

Make a variable to count the number of grades. You'll need a loop like this: [CODE]int gradecounter=0, aGrade, bGrade, cGrade, etc; while (input != null) { input = c.readLine(); gradecounter++; if (input>=90){ aGrade++; } //etc. } System.out.println("Total grades: "+gradecounter+ "A Grades: "+aGrades+"which is "+aGrade/gradecounter;[/code] Etc. Etc. Etc.

Member Avatar for Sheena26
0
496
Member Avatar for Slyvr

It's only reading every other line. It's supposed to print out: 28 80.0 22 1 2 2 3 1 3 But it's only reading: 80.0 1 2 1 [CODE]//Load button - #=daynum, $=wallet, @=inventory, &=employees, !=customers if (btn2.getText().equals("Load")){ int id=0; File file = new File("savefile1.txt"); BufferedReader reader = null; try …

Member Avatar for Slyvr
0
3K
Member Avatar for Slyvr

I have a program with 2 panels, each with it's own class. LeftPanel and RightPanel. Whenever I click a button that does some calculations (like calculating total assets amount) in one of the panels, it doesn't update that info for the other panel. For example....I have this seperate class that …

Member Avatar for Slyvr
0
112
Member Avatar for Tecomapu

NetBeans or Eclipse. I use Eclipse and love it. I'm assuming you can understand the basics and just don't know java's capabilities and syntax. If you really want to jump straight into GUIs, do a google search for "java layouts" and "java swing."

Member Avatar for aligajani
0
168
Member Avatar for Slyvr

I have a buying system set up in one class (the Right Panel class) and it's working great, but my text field for displaying money available is in the Left Panel class. When I click the buy button, it should subtract from the money amount and re-display the new money …

Member Avatar for seanbp
0
116
Member Avatar for Slyvr

I'm fairly new to java, but I'm sure I've done this before and now it's not working right. What am I forgetting here? LeftPanel class [CODE]Inventory inventory; JTextField txtMoney = new JFormattedTextField([COLOR="Red"]inventory.getInvWallet()[/COLOR]);[/CODE] Inventory class [CODE] public class Inventory { public int invId = 0; public int invPrice = 0; public …

Member Avatar for Slyvr
0
106
Member Avatar for Slyvr

GridBagLayout question My main class holds frame and gets left and right panels from other classes [CODE] /** * Matthew Schrum * 11/14/2010 */ import java.util.Random; import javax.swing.JFrame; public class Sim { public static void main(String[] args) { //variables LeftPanel leftPanel = new LeftPanel(); RightPanel rightPanel = new RightPanel(); //GUI …

Member Avatar for Eric Cute
0
179
Member Avatar for Slyvr

I'm trying to organize my frame so that I have two panels, one on the left and one on the right, sort of like a website design with buttons on the right and empty text area on the left. How in the hell is this accomplished? I've been screwing around …

Member Avatar for Ezzaral
0
87
Member Avatar for Slyvr

I'm working on a really basic text editor to save and open txt files. On my text area setLineWrap, it's giving me a "misplaced constructs" and "delete token" for the period and (true) For why? [CODE]/**Matthew Schrum *11/18/2010 */ import java.awt.*; import javax.swing.*; import javax.swing.border.*; import java.awt.event.*; import java.io.File; import …

Member Avatar for Slyvr
0
282

The End.