Jump to content


Photo

GP-Rewarding Quiz


  • This topic is locked This topic is locked
1791 replies to this topic

#1576 GBATEST

GBATEST

    Tiamat

  • Dragon's Sentinel
  • 6,563 posts
Offline
Current mood: None chosen
Reputation: 2
Neutral

Posted 17 May 2009 - 08:27 PM

CorrectSkillet98 Awarded +50 GPs.@badkiller12345678Your answer is copied word for word.+50What does the code below do?
public class NumberGUI	extends JFrame {  /**   * The constructor initializes all the GUI components.   */  public NumberGUI() {	this.setTitle("What does this do?");	this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);	JPanel panel = new AppPanel();	this.getContentPane().add(panel);	this.pack();  }  /**   * Dislays the frame.   */  public static void main(String args[]) {	NumberGUI x = new NumberGUI();	x.show();  }  /**   * <p>Title: AppPanel</p>   * <p>Description: Builds and manages the GUI   *   *   * @version 1.3   */  class AppPanel	  extends JPanel {	//private Vector numbers;	private MyListModel model;	private JList numbersList;	private JButton removeBtn, addBtn;	private JTextField newNumberFld;	/**	 * The constructor initializes all the GUI components.	 */	public AppPanel() {	  //numbers = new Vector();	  model = new MyListModel();	  //numbersList = new JList( numbers );	  numbersList = new JList(model);	  numbersList.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);	  removeBtn = new JButton("Remove");	  addBtn = new JButton("Add");	  newNumberFld = new JTextField(6);	  ActionListener btnListener = new ButtonListener();	  removeBtn.addActionListener(btnListener);	  addBtn.addActionListener(btnListener);	  JScrollPane listPane = new JScrollPane();	  listPane.getViewport().add(numbersList);	  JPanel listPnl = new JPanel();	  listPnl.setLayout(new BoxLayout(listPnl, BoxLayout.X_AXIS));	  listPnl.add(Box.createRigidArea(new Dimension(10, 0)));	  listPnl.add(listPane);	  listPnl.add(Box.createRigidArea(new Dimension(10, 0)));	  JLabel addLbl = new JLabel("New Value: ");	  JPanel addPnl = new JPanel();	  addPnl.add(Box.createRigidArea(new Dimension(10, 0)));	  addPnl.add(addLbl);	  addPnl.add(Box.createRigidArea(new Dimension(5, 0)));	  addPnl.add(newNumberFld);	  addPnl.add(Box.createRigidArea(new Dimension(10, 0)));	  JPanel btnPnl = new JPanel();	  btnPnl.setLayout(new BoxLayout(btnPnl, BoxLayout.X_AXIS));	  btnPnl.add(Box.createRigidArea(new Dimension(10, 0)));	  btnPnl.add(addBtn);	  btnPnl.add(Box.createRigidArea(new Dimension(10, 0)));	  btnPnl.add(removeBtn);	  btnPnl.add(Box.createRigidArea(new Dimension(10, 0)));	  setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));	  add(Box.createRigidArea(new Dimension(0, 10)));	  add(listPnl);	  add(Box.createRigidArea(new Dimension(0, 5)));	  add(addPnl);	  add(Box.createRigidArea(new Dimension(0, 10)));	  add(Box.createVerticalGlue());	  add(btnPnl);	  add(Box.createRigidArea(new Dimension(0, 10)));	  this.setPreferredSize(new Dimension(200, 200));	}   	  private class ButtonListener		  implements ActionListener {		public void actionPerformed(ActionEvent e) {		  if (e.getSource() == addBtn) {			String txt = newNumberFld.getText();			try {			  int num = Integer.parseInt(txt);			  /*							  numbers.add(new Integer( num ));							  Collections.sort(numbers);							  numbersList.setListData( numbers );			   */			  model.add(new Integer(num));			}			catch (NumberFormatException ex) {}			newNumberFld.setText("");		  }		  else if (e.getSource() == removeBtn) {			int i = numbersList.getSelectedIndex();			if (i >= 0) {			  /*								numbers.remove( i );								numbersList.setListData( numbers );			   */			  model.remove(i);			}		  }		}	  }	/**	 * <p>Title: MyListModel</p>	  */	public class MyListModel		extends AbstractListModel {	  private ArrayList list = new ArrayList();	 		public void add(Object obj) {		  int pos = Collections.binarySearch(list, obj);		  //negative means not found.  binarysearch returns -insertionpoint-1		  if (pos < 0) {			pos = - (pos + 1);		  }		  list.add(pos, obj);		  // notify listeners		  this.fireIntervalAdded(this, pos, pos);		}	  		public Object remove(int pos) {		  Object ret = list.remove(pos);		  // notify listeners		  this.fireIntervalRemoved(this, pos, pos);		  return ret;		}	  		public Object getElementAt(int i) {		  return list.get(i);		}	 		public int getSize() {		  return list.size();		}	}  }}
EDIT:One of the staff members will be taking the quiz over for about a week.
  • 0

#1577 Ish

Ish

    Mr. Wonderland

  • Dragon's Sentinel
  • 11,507 posts
Offline
Current mood: Amused
Reputation: 44
Good

Posted 20 May 2009 - 10:36 PM

Haha. I guess no one got that one. If you have the answer feel free to do so but I'm going to move on.+50Why is the U.S's deficit so huge?
  • 0
In a wonderland full of dreams that turn into reality.
PSN: Verbalinter39

~I$h

#1578 Drizleo

Drizleo

    Egg

  • Member
  • Pip
  • 5 posts
Offline
Current mood: None chosen
Reputation: 0
Neutral

Posted 20 May 2009 - 11:29 PM

Haha. I guess no one got that one.+50Why is the U.S's deficit so huge?

Because We're Paying off Other Countries Debts Sending billions of dollars to other contriesand Giving money to companies Who were careless with cash Lets see Em Bail out the Video game companies atleast They'll be able to show for the money with Better games
  • 0

#1579 Ish

Ish

    Mr. Wonderland

  • Dragon's Sentinel
  • 11,507 posts
Offline
Current mood: Amused
Reputation: 44
Good

Posted 20 May 2009 - 11:39 PM

+50 correct+50Who is the author of the book Kite Runner and what's the main basis of the story plot?
  • 0
In a wonderland full of dreams that turn into reality.
PSN: Verbalinter39

~I$h

#1580 Guest_Josh Loves Anarchy

Guest_Josh Loves Anarchy
  • Guest
Offline

Posted 21 May 2009 - 12:29 AM

Kite Runner is by Khaled Hosseini. To make a long story short, it's basically a recap of the life of an Afghan man named Amir. It's provoked from a phone call from one of his old friends.
  • 0

#1581 Guest_Lt Ambrose

Guest_Lt Ambrose
  • Guest
Offline

Posted 21 May 2009 - 03:19 AM

this answer is for the question with the code in it (Ish said i could answer it.). The code creates a GUI (graphical user interface) for a program called JFrame. The rest of the program is not there, only the creation of the GUI.
  • 0

#1582 Ish

Ish

    Mr. Wonderland

  • Dragon's Sentinel
  • 11,507 posts
Offline
Current mood: Amused
Reputation: 44
Good

Posted 21 May 2009 - 03:27 AM

heh. correct to both. +50+100How was Cutner cut off the tv series House? Also what did he pursue to do in real life after his character was killed off?
  • 0
In a wonderland full of dreams that turn into reality.
PSN: Verbalinter39

~I$h

#1583 Guest_Shikra

Guest_Shikra
  • Guest
Offline

Posted 21 May 2009 - 05:45 AM

heh. correct to both. +50+100How was Cutner cut off the tv series House? Also what did he pursue to do in real life after his character was killed off?

Kutner commited suicide. They had to off his character because Kal Penn (the actor) is now the Associate Director of the White House Office of Public Liaison. (I don't even know what that is :()
  • 0

#1584 Guest_Cypher03

Guest_Cypher03
  • Guest
Offline

Posted 21 May 2009 - 08:26 AM

heh. correct to both. +50+100How was Cutner cut off the tv series House? Also what did he pursue to do in real life after his character was killed off?

Cutner committed suicide. in real life he became associate director of the white house office of public liason.10 GPs deducted, please read the rules! - Greenz
  • 0

#1585 Guest_akcsfreak

Guest_akcsfreak
  • Guest
Offline

Posted 22 May 2009 - 06:38 PM

Kutner commited suicide. They had to off his character because Kal Penn (the actor) is now the Associate Director of the White House Office of Public Liaison. (I don't even know what that is :()

I hope I don't get docked for this, as I'm just trying to be helpful, but basically what this means is that he's going help be a Publicist for the United States Government. I'm not 100% positive on this but in other words, he's specifically dealing with Government to general population relations and his job is to help make the United States Government look good and to point out all the things that they're doing to help. Which I suppose is particularly needed at this point in time as there's a lot of mixed feelings about the government.
  • 0

#1586 Ish

Ish

    Mr. Wonderland

  • Dragon's Sentinel
  • 11,507 posts
Offline
Current mood: Amused
Reputation: 44
Good

Posted 27 May 2009 - 06:55 AM

akcsfreak +50Shikra +50Name over 20 shows canceled by Fox in the past 3 years.
  • 0
In a wonderland full of dreams that turn into reality.
PSN: Verbalinter39

~I$h

#1587 Guest_mario1212

Guest_mario1212
  • Guest
Offline

Posted 27 May 2009 - 12:55 PM

1That ’70s Show 2-Stacked 3-Bernie Mac4-Drive5-Malcom In the Middle6-Back to You 7-Canterbury's Law 8-Nashville 9-The Next Great American Band 10- Terminator: The Sarah Connor Chronicles11-Unhitched 12-Arrested Develpoment 13- Sliders14-Wanda at Large15- Herman’s Head16-King of the Hill17-Mad tv18-Do not Disturb19-Prison Break20-Secret Millionaire21-Sit Down, Shut UpI think my dates are correct.

Edited by mario1212, 27 May 2009 - 12:56 PM.

  • 0

#1588 Guest_General_Chang

Guest_General_Chang
  • Guest
Offline

Posted 28 May 2009 - 01:20 AM

Prison Break Terminator: The Sarah Connor Chronicles Canterbury's LawK-VilleNew AmsterdamDo Not DisturbHole in the WallKing of the HillMADtvOsbournes: ReloadedSecret MillionaireSit Down, Shut UpArrested Development The Bernie Mac ShowFree RideHead CasesKiller InstinctKitchen ConfidentialMalcolm in the MiddleReunionThese are 2006-2009 cancellations.
  • 0

#1589 Ish

Ish

    Mr. Wonderland

  • Dragon's Sentinel
  • 11,507 posts
Offline
Current mood: Amused
Reputation: 44
Good

Posted 28 May 2009 - 04:26 AM

+50 except I know for a fact that King of the Hill, Prison Break, Malcolm in the middle and MADtv weren't canceled. They ended except for King of the Hill which is moving forward with a 14th season.King of the HillWhat's the name of Luann's child?
  • 0
In a wonderland full of dreams that turn into reality.
PSN: Verbalinter39

~I$h

#1590 Guest_black lce

Guest_black lce
  • Guest
Offline

Posted 28 May 2009 - 05:10 AM

Luanne from King of the Hill has a daughter named Grace.
  • 0

#1591 Guest_jjandab

Guest_jjandab
  • Guest
Offline

Posted 31 May 2009 - 09:26 PM

Luanne from King of the Hill has a daughter named Grace.

Gracie Margaret Kleinschmidt
  • 0

#1592 Guest_nancy:P

Guest_nancy:P
  • Guest
Offline

Posted 04 June 2009 - 04:52 PM

Mario, Mallow, Geno, Bowser, and Princess Toadstool

Mario, Mallow, Geno, Bowser, Peach.I think that's all...

GPs were deducted from this post, please read the rules! - Κen
  • 0

#1593 Guest_sonic the cool man

Guest_sonic the cool man
  • Guest
Offline

Posted 04 June 2009 - 06:05 PM

mario, malow , geno , peach, and bowserGPs were deducted from this post, please read the rules! - Κen
  • 0

#1594 Guest_edetein

Guest_edetein
  • Guest
Offline

Posted 05 June 2009 - 04:12 PM

Yep, 20 GP it is.Which company did AT&T combine with for phone services? [20 points]

was it cingular?GPs were deducted from this post, please read the rules! - stock
  • 0

#1595 Guest_stanger118

Guest_stanger118
  • Guest
Offline

Posted 06 June 2009 - 02:07 PM

whats the question?GPs were deducted from this post, please read the rules! - Greenz
  • 0

#1596 Guest_Lt Ambrose

Guest_Lt Ambrose
  • Guest
Offline

Posted 08 June 2009 - 12:46 AM

Luanne's daughter's name is Grace Margaret Kleinschmidt.
  • 0

#1597 Ish

Ish

    Mr. Wonderland

  • Dragon's Sentinel
  • 11,507 posts
Offline
Current mood: Amused
Reputation: 44
Good

Posted 11 June 2009 - 03:43 AM

+50 black ice & lt ambroseWhich canceled fox animated show is being brought back to the dead? For what reason and on what network?
  • 0
In a wonderland full of dreams that turn into reality.
PSN: Verbalinter39

~I$h

#1598 Guest_Elven Sniper

Guest_Elven Sniper
  • Guest
Offline

Posted 11 June 2009 - 03:50 AM

+50 black ice & lt ambroseWhich canceled fox animated show is being brought back to the dead? For what reason and on what network?

Futurama, because it worked when they ressurected family guy and network = comedy central
  • 0

#1599 Ish

Ish

    Mr. Wonderland

  • Dragon's Sentinel
  • 11,507 posts
Offline
Current mood: Amused
Reputation: 44
Good

Posted 11 June 2009 - 03:53 AM

Sorta but no. I want you to give me a reason why it was brought back. There's an official reason besides "FG did great so", etc.
  • 0
In a wonderland full of dreams that turn into reality.
PSN: Verbalinter39

~I$h

#1600 Guest_Elven Sniper

Guest_Elven Sniper
  • Guest
Offline

Posted 11 June 2009 - 03:57 AM

Well is it because of the futurama series "blockbuster performance" on DVD and on Comedy Central?
  • 0