Text Size
Thursday, January 27, 2022

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/cmwhittington/theteach.ca/components/com_komento/helpers/string.php on line 327

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/cmwhittington/theteach.ca/components/com_komento/helpers/string.php on line 329

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/cmwhittington/theteach.ca/components/com_komento/helpers/string.php on line 330

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/cmwhittington/theteach.ca/components/com_komento/helpers/string.php on line 331

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/cmwhittington/theteach.ca/libraries/gantry/core/utilities/registry/format/ini.php on line 107

Deprecated: Array and string offset access syntax with curly braces is deprecated in /home/cmwhittington/theteach.ca/libraries/gantry/core/utilities/registry/format/ini.php on line 120

Content

Stacks & Queues

Stacks and Queues are similar ways of holding data.

Parent Category: ICS4U
Read More Comment (0) Hits: 3331

Game Programming

Here are some files that may help with programming games:

KeyPressDemo

ImageLoader

SimpleGame

Parent Category: ICS4U
Comment (0) Hits: 4216

Creating GUI in Java

Creating graphical applets in Java is somewhat more difficult than it would be in a visual language like Visual Basic or Dephi (although visual versions of java are available).

All of the following components are found within the javax.swing package which must be imported:

import javax.swing.*;

In Java the programmer has to position visual objects manually. There are three layouts that can be used:

  1. Border layout -- In border layout the components are organized in a circular pattern around the outside of the frame with a single frame in the center.
  2. Flow layout -- In flow layout the components will move based on the frame size to fit in the best possible way.
  3. Grid layout -- In grid layout the components are placed in a predefined grid pattern.
  4. Complex Layout -- With a complex layout you can place a layout within the frame of another layout.
Parent Category: ICS4U
Comment (0) Hits: 6421

Using your GUI

Download and read the following three java files. Try to understand how the buttons and the code are interacting.

SimpleGUI

UseSimpleGUI

HiBye

Button Panel

Use Button Panel

Parent Category: ICS4U
Comment (0) Hits: 6441

OOP Door Example Files

Parent Category: ICS4U
Comment (0) Hits: 4186