Search Results

Showing results 1 to 32 of 32
Search took 0.01 seconds.
Search: Posts Made By: degamer106 ; Forum: Java and child forums
Forum: Java May 8th, 2008
Replies: 0
Views: 432
Posted By degamer106
Ok, I looked in the API and was able to create the scroll bars. Problem is, I can't make them scroll, even though the parameters I passed in explicitly said to have the bars around. What I'm trying...
Forum: Java May 8th, 2008
Replies: 6
Views: 3,156
Posted By degamer106
I have a bunch of text and combo boxes. For example,

Day: [Day Combo Box]
Date: [Date Combo Box]
AMPM: [AMPM Combo Box]

I used BoxLayout.Y_AXIS to align them vertically but the boxes seem to...
Forum: Java May 8th, 2008
Replies: 6
Views: 3,156
Posted By degamer106
Ok I got it.

A question related to layout managers though: I know BoxLayout tends to "stretch" the components to make them fit inside a panel. How do I modify the panel's dimensions?
Forum: Java May 8th, 2008
Replies: 6
Views: 3,156
Posted By degamer106
When I add buttons to a panel, the buttons seem to take a huge amount of space. How do I get rid of the space? For example:


import java.awt.*;
import java.awt.event.*;
import javax.swing.*;...
Forum: Java May 8th, 2008
Replies: 5
Views: 557
Posted By degamer106
All right I managed to get it. Thanks a bunch.

I'm still a little unclear about some of the fields in Calendar/GregorianCalendar though. I had to find out the hard day that decrementing...
Forum: Java May 8th, 2008
Replies: 5
Views: 557
Posted By degamer106
Thanks, it worked perfectly.

I have another question though: Given some date, how do I find out what the date for the first day of the week is? For instance,


GregorianCalendar cal = new...
Forum: Java May 8th, 2008
Replies: 5
Views: 557
Posted By degamer106
Suppose I have a week that begins with Sunday and ends with Saturday (so UMTWThFS). How do I get the date for each day of the week if, lets say, we use this month and year? I looked in the API but...
Forum: Java May 6th, 2008
Replies: 5
Views: 648
Posted By degamer106
hmmm I tried that as well and I still don't get anything in the frame.

I can view each component separately if I only have one added to the frame, but not both. Does it have something to do...
Forum: Java May 6th, 2008
Replies: 5
Views: 648
Posted By degamer106
I tried both. Nothing gets drawn to the panel.

frame.setLayout(new FlowLayout());

Can JComponents be nested?
Forum: Java May 6th, 2008
Replies: 5
Views: 648
Posted By degamer106
I'm having a little trouble trying to nest two component classes (both extend JComponent) together. When I create the frame in my tester file, instantiate each class, and try to add both of them to...
Forum: Java May 4th, 2008
Replies: 2
Views: 391
Posted By degamer106
1) How do I tell if I have java 5 or java 6 installed?

2) I have my program commented using javadoc syntax. However, when I run javadoc from the command prompt and then open the html files, I do...
Forum: Java Mar 20th, 2008
Replies: 1
Views: 402
Posted By degamer106
The problem is that I have an ArrayList which stores objects that contain a Shape (actually a Composite shape like a Car) and (x,y) coordinates. Suppose I'm supposed to retrieve each object and the...
Forum: Java Mar 20th, 2008
Replies: 3
Views: 614
Posted By degamer106
Hi,

I changed my add method so that it returns a JButton and it works fine. One thing I forgot to mention though was that the Box class was supposed to be a container of Buttons (each button has...
Forum: Java Mar 20th, 2008
Replies: 3
Views: 614
Posted By degamer106
I'm trying to put all the buttons (and their icons) into a single class. However, when I try to draw just one button in a frame, it doesn't show up. I can get it to be displayed if I instantiate...
Forum: Java Dec 18th, 2007
Replies: 1
Views: 1,342
Posted By degamer106
I'm stuck trying to figure out how to update the text field after I click on the button in the GUI. The number of roaches is supposed to be updated each time I click, but I can't seem to find the...
Forum: Java Dec 3rd, 2007
Replies: 8
Views: 1,256
Posted By degamer106
c:\fall2007\test\Homework\Due Dec 5> javac WorkerTester.java

The WorkerTester.java file as well as all the other files associated with it is located in the directory, so I don't think I have to...
Forum: Java Dec 3rd, 2007
Replies: 5
Solved: Interfaces
Views: 810
Posted By degamer106
ohhh, ok ty. I wasn't aware of the instanceOf.
Forum: Java Dec 3rd, 2007
Replies: 8
Views: 1,256
Posted By degamer106
Still getting the same problem.
Forum: Java Dec 3rd, 2007
Replies: 5
Solved: Interfaces
Views: 810
Posted By degamer106
eh, I just went through my class notes again and figure it out.
Forum: Java Dec 3rd, 2007
Replies: 8
Views: 1,256
Posted By degamer106
This is a relatively simple program but for some reason, I can't compile it. I'm pretty sure the code is correct and working.

My compiler keeps saying that it cannot find a constructor matching a...
Forum: Java Dec 2nd, 2007
Replies: 5
Solved: Interfaces
Views: 810
Posted By degamer106
See this is what I'm confused about: how do I know what I'm going to compare given that the compareTo() method is supposed to be able take any type of object argument? Different data types added to...
Forum: Java Dec 2nd, 2007
Replies: 5
Solved: Interfaces
Views: 810
Posted By degamer106
So we're supposed to modify this class, which implements Comparable, so that it accepts any type of object. The Comparable interface contains the method signature for compareTo, which I need to...
Forum: Java Nov 30th, 2007
Replies: 9
Views: 2,040
Posted By degamer106
I did something along the lines of what mickinator posted up. Thx for the replies.
Forum: Java Nov 28th, 2007
Replies: 9
Views: 2,040
Posted By degamer106
thx for the reply.

The goal of this problem was for us to practice handling exceptions. I actually managed to solve the problem, though my solution was rather messy. I ended up using 2 scanner...
Forum: Java Nov 28th, 2007
Replies: 9
Views: 2,040
Posted By degamer106
So here's the problem



Here's what I'm trying to do.

while (flagA)
{
try {
while (flagB)
Forum: Java Oct 24th, 2007
Replies: 2
Views: 4,767
Posted By degamer106
Heya, thanks for the reply but I already finished it =P.
Forum: Java Oct 24th, 2007
Replies: 2
Views: 4,767
Posted By degamer106
Ok, so my goal is to draw a rectangular spiral in java. So far, I've created the Spiral Viewer class and the SpiralComponent but I'm not quite sure how I would implement the SpiralGenerator class. ...
Forum: Java Oct 24th, 2007
Replies: 2
Views: 799
Posted By degamer106
I'm supposed to design a method that takes in a double value and translates the value into the closest letter grade. 4,3,2,1,0 denote A, B,C,D,F, respectively. + increases a grade's numerical value...
Forum: Java Oct 10th, 2007
Replies: 3
Views: 1,223
Posted By degamer106
I'm trying to get this ISBN checker to work. I've used the formula from this site (http://mathworld.wolfram.com/ISBN.html) and also this site...
Forum: Java Oct 3rd, 2007
Replies: 4
Views: 970
Posted By degamer106
Thank you, that cleared some confusion up for me. That helped me finish this Bar Chart program.

However, there's one thing I don't understand from here and that is the Graphics2D.

In the...
Forum: Java Oct 3rd, 2007
Replies: 4
Views: 970
Posted By degamer106
One of the things that's been confusing me so far is why we have to override the paintcomponent() function after extending it. For example, this program draws an ellipse:

import java.awt.Color;...
Forum: Java Sep 26th, 2007
Replies: 1
Views: 5,483
Posted By degamer106
Hi, I need help with drawing an ellipse that is bounded by the window it is drawn in. I have to use the Ellipse2D API.

Maybe I'm overlooking something but I can't seem to get the circle to fit...
Showing results 1 to 32 of 32

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC