So I'm trying to draw a sort of oval on a button and textarea. Yes, there is a reason why I can't just use a Panel or Frame.
So the button and textarea already has text on it and needs to stay as a button and textarea for the reason of the program.
So far, I only got one button to have this circle, but none of the other buttons show up with the circles. And the textareas aren't showing any circles at all.
My Code so Far for the buttons:
for (int i = 0; i < (label.length) / 2; i++) {
butt = new JButton(label[i]); // label contains the text on button
butt.setPreferredSize(new Dimension(83, 100));
butt.add(smallPit); //smallpit is the circle graphics
game.add(butt); // game is a panel
// butt.setLayout(null);
}
for (int i = 6; i < label.length; i++) {
butt = new JButton(label[i]);
butt.setPreferredSize(new Dimension(83, 100));
butt.add(smallPit);
game.add(butt);
}
Code for textarea
score2.setBounds(0, 50, 100, 210);
score1.setBounds(700, 50, 100, 210);
score2.add(scorePit);
score1.add(scorePit);
The outcome so far: