Java-Gaming.org    
Featured games (78)
games approved by the League of Dukes
Games in Showcase (427)
Games in Android Showcase (89)
games submitted by our members
Games in WIP (466)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: Creating an text area on: 2005-07-23 06:40:31
Right now my problem is that the textbox area takes up the whole window Sad Sad how would i be able to make it half its size and have it positioned on the bottom?  Also i would like to fix the window so it cannot be resized by the user.

Thanks for your help!
2  Game Development / Newbie & Debugging Questions / Re: Creating an text area on: 2005-07-23 02:47:19
I have revised my .java and decided to only learn how to make text fields first.  Right now I am having trouble trying to set the size and the position of my textbox.  I would like it to be only half the size of the window positioned and the bottom however, right now the textbox seems to take up the whole window.

Here is my .java


Thank you very much for your help!!

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.JScrollPane;
import java.awt.Color;


public class ConfigTester {
   
   private static final int FRAME_WIDTH = 800;
   private static final int FRAME_HEIGHT = 600;
   

   
   public static void main(String[] args) {
     
      Color frameBackgroundColour = new Color(76,88,68);
     
     
      JFrame myFrame = new JFrame("Config Editor 1.0");
      myFrame.setBounds(0,0,FRAME_WIDTH,FRAME_HEIGHT);
      myFrame.setBackground(frameBackgroundColour);
      myFrame.addWindowListener( new WindowAdapter() {public void windowClosing(WindowEvent e) {System.exit(0);}   });
     
     
     
      final int AREA_ROWS = 10;
      final int AREA_COLUMNS= 30;
      final JTextArea resultsArea = new JTextArea();
      resultsArea.setEditable(false);
     
     
     
      JScrollPane scrollPane = new JScrollPane(resultsArea);
     
      scrollPane.setBounds(0, 0, AREA_ROWS, AREA_COLUMNS);
      scrollPane.setBackground(frameBackgroundColour);
     

     

     
     
      myFrame.getContentPane().add(scrollPane);
     
     
     
      myFrame.setVisible(true);
     
     
   }

}
3  Game Development / Newbie & Debugging Questions / Re: Creating an text area on: 2005-07-23 01:14:01
Oh I am using JDK 1.5 right now and eclipse to write my programs.

Thank you for all your help!! I will try to fix my program right now.
4  Game Development / Newbie & Debugging Questions / Creating an text area on: 2005-07-22 23:56:31
I would like to create a simple window that has a text area
where people cannot edit text area, and there should be a scroll bar for it also.
On the top right corner above the text area should be a button that says "Print Out Config"

the result is just a simple widow that has a blank text area with a scroll bar next  to it, a button somewhere that says Print Out Config.

I have tried the following, but nothing shows up when I run the program.

so far this is what I have came up with

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.JScrollPane;
import javax.swing.JButton;
import javax.swing.JPanel;
import java.awt.BorderLayout;

public class ConfigTester {
   
   private static final int FRAME_WIDTH = 800;
   private static final int FRAME_HEIGHT = 600;
   

   
   public static void main(String[] args) {
     
      JFrame myFrame = new JFrame("Config Editor 1.0");
     
     
      myFrame.setBounds(0,0,FRAME_WIDTH,FRAME_HEIGHT);
      myFrame.setVisible(true);
     
      myFrame.addWindowListener( new WindowAdapter() {public void windowClosing(WindowEvent e) {System.exit(0);}   });
     
      final int AREA_ROWS = 10;
      final int AREA_COLUMNS= 30;
     
     
      final JTextArea resultsArea = new JTextArea(AREA_ROWS, AREA_COLUMNS);
      JScrollPane scrollPane = new JScrollPane(resultsArea);
     
      resultsArea.setEditable(false);
     

     
      JButton printAllButton = new JButton("Print Out Config");
     
      JPanel northPanel = new JPanel();
      northPanel.add(printAllButton);
     
      myFrame.add(northPanel, BorderLayout.NORTH);
      myFrame.add(scrollPane);
     
     
     
     
   }
}
5  Game Development / Newbie & Debugging Questions / First Timer Here on: 2005-07-22 19:42:18
Hello everyone!  This is my first time visiting this forum and my first time attempting to create a java game.  I hope I can get some help from you guys  Grin  I would like to introduce myself first, I have just recently learned Java 1.5 from college and currently pre majoring in computer science.  Right now I would like try something new such as creating my first java game.

Well what I have in mind isnt really a java game, but more of an application that uses some of the java games technique.  I am trying  to create an application where a user can input information and store it in the app. 

I would like to learn how to create a window that has

Text boxes to input information
Radio Buttons and Check mark squares (not correct term but i think you know what i am talking about)
And a Skin for the window,  (like the winamp custom skins people use)

Can anyone please recommend some tutorial sites reguarding the above?

Any help would be greatly appreciated!! Thanks!!!
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (78 views)
2014-04-15 18:08:23

BurntPizza (70 views)
2014-04-15 03:46:01

UprightPath (81 views)
2014-04-14 17:39:50

UprightPath (66 views)
2014-04-14 17:35:47

Porlus (82 views)
2014-04-14 15:48:38

tom_mai78101 (106 views)
2014-04-10 04:04:31

BurntPizza (166 views)
2014-04-08 23:06:04

tom_mai78101 (262 views)
2014-04-05 13:34:39

trollwarrior1 (212 views)
2014-04-04 12:06:45

CJLetsGame (221 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!