1,678 Posted Topics

Member Avatar for Superstar288

There are two obvious things you could do as far as how you're thinking about the section of the Seats. Scenario 1: Think of the section the seat is in as a property of the seat. (In other words, since the seat will always be in the same section, you …

Member Avatar for Ezzaral
0
148
Member Avatar for jbennet

Haha I just realized what was going on. At first I read this and I was thinking "how is ezzeral's code going to produce that pound symbol?" because I literally thought you wanted that sign before the amount

Member Avatar for BestJewSinceJC
0
99
Member Avatar for jdbarry

The code is the same in a static method as it would be in main. and main [I]is[/I] a static method - just look at the method header.

Member Avatar for BestJewSinceJC
0
176
Member Avatar for BestJewSinceJC

Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); Java Sun's site is down right now so I can't check but I'm guessing this is an old method since according to Eclipse, the method doesn't exist anymore. So my question is, are there any other ways to do the same thing?

Member Avatar for BestJewSinceJC
0
111
Member Avatar for dbwalters

[CODE=java]public class anExample{ private Object obj; private static Object obj2; public Object obj3; public static Object obj4; public static void main(String[] args){ } //other methods }[/CODE] From a method inside the class with an instance of anExample: You can refer to (use) obj and obj3. From a static method inside …

Member Avatar for hrdzdier
0
827
Member Avatar for curtissumpter

if you just say imgIcon = new ImageIcon("jhtp3.gif"); it's probably going to assume that jhtp3.gif is located somewhere under your current project. So download it and put it there, or at least download it to your computer and specify the pathname in your argument to ImageIcon. Also, use code tags.

Member Avatar for danielernesto
0
884
Member Avatar for fran121
Member Avatar for frozen_death

If you want examples consult Java Sun's tutorials on Swing. They have plenty.

Member Avatar for BestJewSinceJC
0
29
Member Avatar for milgo
Member Avatar for Ezzaral
-1
123
Member Avatar for Chaster

Post your code (the part that is relevant to your question). [url]http://java.sun.com/docs/books/tutorial/networking/sockets/readingWriting.html[/url] Also, take a look at that example, particularly the part where the PrintWriter and BufferedReader objects are created.

Member Avatar for BestJewSinceJC
0
84
Member Avatar for mona515

For one, you don't have a main method (that you showed), so you never constructed a PermutationGenerator object and int[] result = new int[length]; has no effect since it is never called. Secondly, if you wanted to put the stuff from the result array into the choices ArrayList, it would …

Member Avatar for notuserfriendly
0
84
Member Avatar for k2k

The problem is that nextDouble does not advance past the newline. You can use the methods in any order that works for you; none of the methods is necessarily better or worse, it depends on your situation. For example, you could continue to use nextDouble in your case, and simply …

Member Avatar for stephen84s
0
115
Member Avatar for aodpreacher

Sort it yourself, even use a BubbleSort if you want, since its a small collection of cities. I used a PriorityQueue for one of my projects before and it isn't hard to implement the default Java class for it, but you'll learn more doing it yourself probably.

Member Avatar for BestJewSinceJC
0
137
Member Avatar for youngstorm

You can use Integer rather than int. null, as far as I know, can only be used with Objects. int is a primitive type whereas Integer is an Object or class type. So change the return type of your method to Integer.

Member Avatar for youngstorm
0
126
Member Avatar for dmoliver

You only need to do a few things: Read in the characters from the file. As you go, assign a number to each character (make sure you don't assign the same number to two different characters). Keep these number-character pairs in a list. Then read the numbers from the file, …

Member Avatar for BestJewSinceJC
0
158
Member Avatar for BestJewSinceJC

I have to write a program that mimics a digital clock w/ seconds, minutes, and hours. I'm sure I can get the displays working on my own and everything. My concern: what is the most efficient way to check the time? Should I just do Thread.sleep for 1 second then …

Member Avatar for Ezzaral
0
124
Member Avatar for Alishaikh

You didn't ask a question or explain what was wrong with the program. Surely if you've worked on it you know an area where your code doesn't work.

Member Avatar for Alishaikh
0
116
Member Avatar for jdbarry

Or you could think of it in a few other ways. For example 1 * 10 ^ -1 is the same as 1/10^1 or 1/10. It is also equivalent to moving the decimal place back a few spots.

Member Avatar for jdbarry
0
86
Member Avatar for srs_grp

I think you have to call the revalidate method on your JTable, after removing or adding a column, to make it work. Its been a while, but I think that's the advice Ezzaral gave me when I asked a similar question before (I could be misquoting him; whatever advice he …

Member Avatar for BestJewSinceJC
0
198
Member Avatar for BestJewSinceJC

After some research I found this link [url]http://splainhow.com/jogl_eclipse.html[/url] which explains how to set up a project in Eclipse to use OpenGL with it. But I want to integrate the OpenGL libraries for JOGL with Eclipse so that I can import and use them with any projects. Does that make sense? …

Member Avatar for stephen84s
0
102
Member Avatar for evilllllll

Post your code in code tags and indent it properly (before posting it in code tags) and people will help you.

Member Avatar for BestJewSinceJC
0
115
Member Avatar for llemes4011

I did a project like this, except with more strict guidelines. What you do is use either a stack or a queue. Push the start space onto the stack/queue. Then, push any adjacent cells (that you can move to!) from the cell you're currently at (at first, this will be …

Member Avatar for llemes4011
0
177
Member Avatar for Infectme

Make the changes that Ezzaral suggested, then re-post your code. You are more than likely just missing a closing brace somewhere. For every opening { brace, you need a closing } one.

Member Avatar for javaAddict
0
124
Member Avatar for Modo

if (today.before(birthDate)) You're passing a GregorianCalendar Object to the before method. Are you sure this is correct? I wouldn't really know, but I don't see how a calendar and a day are the same thing.... you should be passing a day to the before method, probably. edit: Yeah, it seems …

Member Avatar for Modo
0
137
Member Avatar for java2000

You could also make an Object that holds a name and an integer. The integer would be timesSeen. Then you'd only need one array. Either way works.

Member Avatar for java2000
0
175
Member Avatar for celebritybree

So the numbers have to be in a continuous sequence? Or is that just a coincidence in the bad example you picked? Because from what you [I]stated[/I], you could just generate four random integers and display them and you're done. Or do two of the numbers have to be the …

Member Avatar for celebritybree
0
96
Member Avatar for LucyB

You need to keep track of the size of your array, then loop over the contents which have been filled, adding them. If it was an array of Objects, and the array was initialized to null (same as Java?), you could also use an if statement such as... if (element …

Member Avatar for William Hemsworth
0
224
Member Avatar for ahspats

That doesn't make sense. Maintain a sorted linked list by making sure that every time you do an insert, it is inserted in sorted order. No need for a sorting algorithm.

Member Avatar for Luckychap
0
145
Member Avatar for yasserovic

And I quote you the same post I made to you when you posted this exact thread on PFO: [QUOTE=Me to your stupid ass] Lol. I coded it already; took me 2 minutes and I don't even know C++. No, but seriously, nobody is going to do your homework for …

Member Avatar for Murtan
0
122
Member Avatar for letlet_pogs

Any Object can be inserted into a queue. Think about it logically - a queue is just a collection of items where the first thing put in the queue will be the first thing to come out of the queue. A line at a grocery store is an example of …

Member Avatar for ~s.o.s~
0
101
Member Avatar for leeba

4-5 4-5-6 4-3 4-3-2 I count 4 ways. And the number you start at will never matter if I'm doing this correctly, so whats the point? If I'm not doing it correctly than perhaps you should explain.

Member Avatar for BestJewSinceJC
0
95
Member Avatar for radhasb

Items will be aligned in a container in the order that you add them. So yes, it is possible. Is that what you're asking? If you wanted the button above, just add the button first and add the table second.

Member Avatar for Ezzaral
0
115
Member Avatar for metemostan

[QUOTE=jwenting;327654](only universities can have professors, and those won't touch introductory programming courses) [/QUOTE] The second part is false. And Chico, post your own thread, post what code you've written in code tags, and explain what problem you're having and what part of the code you're having it in.

Member Avatar for BestJewSinceJC
0
137
Member Avatar for ezkonekgal

Can you post the error you are getting? It should include the line number, method names, and error name... info that would be incredibly helpful in helping you.

Member Avatar for ezkonekgal
0
231
Member Avatar for mukesh.dagar

I could be wrong, but I think that is what the sticky at the top of this forum is there for. ;) [url]http://www.daniweb.com/forums/thread99132.html[/url]

Member Avatar for verruckt24
1
108
Member Avatar for deepak777mishra

An easy way to do this would be to google "Eclipse" and then download the Eclipse editor from their website. It comes with everything else you need (although if you don't know what you need, you should learn what those things are).

Member Avatar for BestJewSinceJC
0
46
Member Avatar for fomi101
Member Avatar for BestJewSinceJC
0
57
Member Avatar for fanatic

If you want to parse a String into Integers, use the method Integer.parseInt(stringParseableAsIntHere). If you're sending the String to a char array, you could use the " + " operator and "" to put it back as a String and use the parseInt method.

Member Avatar for fanatic
0
109
Member Avatar for igok

So what is your definition of a subsequence? I still don't understand what you are saying at all.

Member Avatar for igok
0
122
Member Avatar for fantasy416

[url]http://www.daniweb.com/forums/announcement9-2.html[/url] Maybe that will help.

Member Avatar for stultuske
0
98
Member Avatar for rpjanaka

Look at the Java Sun tutorial on ActionEvents and ActionListener. They have all the examples you need as well. I was able to learn all about them by myself, and so will you, if you read. If you have any specific questions, ask those...

Member Avatar for stephen84s
0
94
Member Avatar for rzeta

What error are you getting? Where do you need help? [B]Can you identify any portion of your code that isn't working as you expect it to?[/B] If so, how do you expect it to work? If you can't answer these questions, don't bother posting a question on this site because …

Member Avatar for BestJewSinceJC
0
68
Member Avatar for jacline

See this [url]http://www.daniweb.com/forums/announcement9-2.html[/url] And your directions say to make it 'trivial to implement other letters' but I'm not sure how trivial it can be to do print output like this. It's not that difficult, but it was always aggravating to me. A relatively easy way to do this might be …

Member Avatar for Salem
0
91
Member Avatar for caps_lock

Personally I would write this in C over Java. Only because Java is Object oriented and the problem you have posed isn't. Well sort of, but even more the fact that C will probably be much faster than Java for this project. Also, this topic has been posted on daniweb …

Member Avatar for jbennet
0
257
Member Avatar for srs_grp

You can't instantiate a 'Blob'. According to the API, it is an interface. You can, however, instantiate SerialBlob.

Member Avatar for ~s.o.s~
0
128
Member Avatar for John G

Use code tags. [CODE]system.out.println("You entered a wrong month"); Should say: [B]S[/B]ystem.out.println .... [/CODE] And in at least one spot that I noticed, you're using "=" to compare things, when you should be using "==". One equals is used for assignment (to set day = today; for example), two equals are …

Member Avatar for Antenka
0
116
Member Avatar for ezkonekgal

You have to tell us what a multiple stack is. I don't think very many people have heard that term before. Then we can help you. If a multiple stack is just more than one stack, which would seem likely, then just use a Vector of Vectors. So a Vector …

Member Avatar for ezkonekgal
0
310
Member Avatar for TAboy24

Post the code [I]in code tags[/I] that you think is incorrect, or at least post the compiler errors you are getting.

Member Avatar for BestJewSinceJC
0
102
Member Avatar for bhob

^ Huh? What S.o.S said is correct, and also, if I'm not mistaken, is what Eclipse and a lot of other IDE's and editors use to 'check' whether or not there is a syntax error (w/ parens and brackets).

Member Avatar for verruckt24
0
194
Member Avatar for nitinnitin18

This might also be useful to you, as it gives greater control than most of the other layout managers. But I'm not sure why setSize isn't working... post your code? [url]http://java.sun.com/docs/books/tutorial/uiswing/layout/gridbag.html[/url]

Member Avatar for BestJewSinceJC
0
118

The End.