Questions tagged [bluej]

BlueJ is a popular Java IDE aimed at teaching the principles of object oriented programming.

BlueJ is an open source platform written in Java that's especially aimed at beginner developers. It presents items to the user in a much more easy and intuitive format than more comprehensive IDEs such as Netbeans or Eclipse, helping people get started quickly and easily whilst also understanding what's going on.

Download

The latest version of BlueJ is available from the download page, here.

Useful Links

1093 questions
3
votes
3 answers

Need a return Statement? - new to coding

The idea is different lots in an auction. I know I need a return statement of type "Lot" however I am not sure what that would be. Here is my code. public Lot getLot(int lotNumber) { int index = 0; boolean found = false; while(index <…
user5655720
3
votes
3 answers

Conditioning which method to use

Lets say I have a class, myClass that has two methods - addOne() and addTwo(). I have another class, adding. This class has an instance boolean variable, oneOrTwo. This variable decides whether to use addOne() or addTwo() on a myClass object. I have…
nettek
  • 213
  • 1
  • 3
  • 13
3
votes
1 answer

ComboBox in java doesn´t work bluej

I have a problem with my ComboBox, I search everywhere and my code is fine.. But when I execute the program it shows me an error java.lang.NullPointerException Here's my Code package InventarioGUI; import java.awt.*; import…
EyMarie
  • 41
  • 1
  • 8
3
votes
1 answer

Problems displaying GUI components with img background

I've added a background to my Java Applet, I need some help understanding why the applet isn't displaying properly. To display this background image I've used the code seen below: BufferedImage img = null; try { URL url = new…
JL9
  • 533
  • 3
  • 17
3
votes
0 answers

Adding a background image to my Java Applet

I'm making a Java Applet that has a null layout. I know everyone says this is bad, but in this case it is needed. I'm trying to add a background image to my applet, and I'm not too sure how to do it. I've seen lots of different ways but I don't…
JL9
  • 533
  • 3
  • 17
3
votes
0 answers

How to make a countdown timer in Java?

I need a countdown timer that does a task every second (change a label's text so it appears to be counting down). I've looked at a lot of the Java docs and also at examples online but I don't really understand any of them (I'm new to programming) so…
JL9
  • 533
  • 3
  • 17
3
votes
1 answer

unexpected return value when computing average?

I am having trouble being able to return the value of the "average" variable in my getter method. I keep getting the error "incompatible types: unexpected return value" but the value is defined above in the setter method? I looked for a similar…
bretth18
  • 53
  • 1
  • 2
  • 8
3
votes
3 answers

How to add actionlistener to textfield in Java

so this is the concept: Simply, there's a textbox with "Name" as the value, and I wanted that if I click anywhere IN the textbox, the value "Name" will disappear. This is what I've done in my code: JTextField t1 = new JTextField("Name",…
Rex Endozo
  • 53
  • 1
  • 2
  • 10
3
votes
2 answers

GitHub w/ BlueJ, I can Checkout a Project but cannot Commit Updates(or any project)

I am new to GitHub & repositories but have done a lot of reading and trying to get a grasp on how it all works. I am working on a group project via BlueJ. I created an account and a repository on GitHub. Through BlueJ using Team Settings, I have…
ccubi
  • 31
  • 2
3
votes
4 answers

\n and \\s+ not working in Java

So I'm an IB student and I'm taking Comp. Sci. we need to create a code to solve a problem, as i was writing my Java code I found the String.replaceAll(); that is helpful in writing my code. I had to remove any white spaces, and any new lines, so I…
Ali
  • 31
  • 1
  • 3
2
votes
3 answers

Highlight code between brackets

I have been programming for a long time in BlueJ and get used to some of stupid, yet useful things it has, like boxing the code between brackets, like in the code seen here: Do you know of any IDE or plugin for it that can do this? BlueJ is too…
icedgoal
  • 646
  • 6
  • 17
2
votes
0 answers

Creating a non-Attacking Queens game that is supposed to print out all 92 solutions of 8 queens on a chess board that cannot attack eachother

I made the 8x8 chess board and have a lot of the code done, but for some reason it only print out one solution, does anyone know why this may be and how I can fix it? public class NonAttackingQueens { private int[][] board; private int…
doug
  • 21
  • 2
2
votes
1 answer

How do you prevent a group from moving by itself when moving objects inside of it?

It seems that when I move the circle outside the group of squares, it moves the squares even though there is no code that does that. I'm 99% percent sure it is because the group is trying to auto center itself, but it only does it if I change the…
Dragger123
  • 23
  • 5
2
votes
1 answer

java not getting output piglatin

The following is my code for converting all the words of the sentence into PigLatin, ie "Her food is stolen" to "ERHAY OODFAY ISAY OLENSTAY", but the output which I am getting is ERHAY. Any corrections would be appreciated. Thanks. public class…
2
votes
1 answer

Program compiles fine but crashes with NoClassDefFoundError

I have written five classes, which, in a nutshell, serve the purpose of creating a GUI and recording participants for a conference. I have built panels and added them, FocusListeners, ActionListeners, ItemListeners. From what I can gather, the…
unit
  • 415
  • 1
  • 8
  • 15
1 2
3
72 73