Questions tagged [jframe]

A JFrame is a component and top-level container of the JFC/Swing framework.

Filter by
Sorted by
Tagged with
1 vote
0 answers
34 views

Why does BorderLayout crop out JSlider on JFrame

I have some working code with a small circle randomly appearing around a large circle in the middle, kinda like planets. I have implemented a JSlider that controls the speed of the small ball moving ...
Laser Infinite's user avatar
0 votes
1 answer
90 views

How do you make a shape slide on a JFrame?

I have some simple code that draws a dot in one of 8 places on a screen. There is a higher chance the dot will appear in some locations more than others. The code works and all, but it feels kind of ...
Laser Infinite's user avatar
0 votes
1 answer
698 views

Should I use Panels or Frames?

Hi I am creating my first game in NetBeans using Java, the game is going to be an RPG that will look a bit look Undertale on the surface in that there will be a menu, then a load game section and then ...
Grace's user avatar
  • 3
0 votes
1 answer
1k views

JFrame pack() method

I was developing a game using java AWT and I realized that the position of pack() method can influence rendering. For instance: Frame Class ...
Zerro97's user avatar
  • 43
0 votes
1 answer
846 views

How do I split my screen to include a JFrame and a lwjgl screen

I a making a game and I'm going to make a little side GUI to create game items. How can I have a window both include a Canvas element and an lwjgl window.
user avatar
1 vote
1 answer
157 views

Why my keyPressed method stops reacting to any key i press after i hold (W/A/S/D) for 1 or 2 seconds?

...
Raymond Liu's user avatar
0 votes
1 answer
978 views

How to resize 2D Java game without “squeezing” it?

I am trying to make my second java game (2D) but i have run in a problem: The game will be in fullscreen, but how can i make it so it is scaled properly for each screen? While researching i found out ...
Feconiz's user avatar
  • 28
0 votes
1 answer
398 views

Moving a tiled map in a jframe

I rendered a tiled map, with the help of slick2d, in my JFrame in Java. I can move my main character, but it is just that the character itself moves. I would like to do it that, if the player moves, ...
TheDoge's user avatar
1 vote
1 answer
2k views

Tile Maps in Java JFrame Game

I am making a 2D Java game with Java's own drawing library. I was wondering how I would make a tile map display on the screen. I would prefer to use a GUI application to make the maps. I'm looking for ...
user avatar
0 votes
1 answer
235 views

JFrame launcher stays open when I'm finished with it

I have written a launcher that prompts the user for their name then starts the game when they hit enter. The launcher looks like this: But when the user hits enter, this happens: The launcher stays ...
user avatar
0 votes
1 answer
3k views

Do you extend Java, to make games, or can you just use JFrame?

I'm starting to create my own side scroller, in Java. I think I've read that, when you create a game in Java, there is something you can extend your class with, like ...
User's user avatar
  • 175