Skip to content

Instantly share code, notes, and snippets.

View tacksoo's full-sized avatar

Tacksoo Im tacksoo

  • Georgia Gwinnett College
  • Lawrenceville, GA
View GitHub Profile
@tacksoo
tacksoo / ArrayTooBig.java
Created March 28, 2014 15:17
Java examples of memory issues
public class ArrayTooBig
{
public static void main(String[] args)
{
String [] strs = new String[Integer.MAX_VALUE];
}
}
@tacksoo
tacksoo / git_github.md
Last active August 29, 2015 14:06
WIT Kickoff event: 9/19/2014 Presentation on Git and GitHub

Git is referred to as a distributed version control and source code management (SCM) program. What this means is that it is a fancy way to store and share your programs with other people.

First, let's think what the problems are with regular backups? Suppose we are doing a group project. How would you share code among your teammates? You could email each other the code but it would get tedious very quickly. Also, what happens when you make some changes that turn out to be wrong and you have to go back to a previous working version? These issues can be resolved with a SCM program such as Git. Git is one of the more popular SCM's.

GitHub is a popular website that host projects using Git and it also provides other services such as project management (issues), web hosting, etc.

Okay, so where do we begin? Let's first create an account in GitHub.


@tacksoo
tacksoo / TempConverter.java
Created April 2, 2012 05:41
TempConverter
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.text.DecimalFormat;
/**
This class displays a window with a slider component.
The user can convert the Celsius temperatures from
0 through 100 to Fahrenheit by moving the slider.
*/
@tacksoo
tacksoo / MyCatImage.java
Created April 2, 2012 05:42
MyCatImage
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
/**
This class demonstrates how to use an ImageIcon
and a JLabel to display an image.
*/
public class MyCatImage extends JFrame
@tacksoo
tacksoo / MenuWindow.java
Created April 2, 2012 12:33
MenuWindow
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
/**
The MenuWindow class demonstrates a menu system.
*/
public class MenuWindow extends JFrame
{
@tacksoo
tacksoo / ListWindow.java
Created April 2, 2012 12:42
ListWindow
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
/**
This class demonstrates the List Component.
*/
public class ListWindow extends JFrame
{
@tacksoo
tacksoo / PizzaOrder.java
Created January 24, 2013 05:36
GridLayout Example
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.BorderFactory;
import javax.swing.ButtonGroup;
import javax.swing.ImageIcon;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
@tacksoo
tacksoo / CardLayoutExample.java
Created January 24, 2013 15:01
An example of Java CardLayout
import java.awt.CardLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
@tacksoo
tacksoo / Unresponsive.java
Last active December 11, 2015 21:48
EDT Example
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.SwingUtilities;
public class Unresponsive extends JFrame implements ActionListener{
public Unresponsive() {
@tacksoo
tacksoo / WordCountRunnable.java
Last active December 11, 2015 23:58
Multithreaded Java program that counts how many times a certain word appears in a text file.
import java.io.File;
import java.io.FileNotFoundException;
import java.util.Scanner;
import javax.swing.JTextArea;
import javax.swing.SwingUtilities;
public class WordCountRunnable implements Runnable {
private String word;