Please somebody help me with this

1.1 modify the application so that:
i) Information about any foreign key constraints for the selected table is displayed eg as
additional labels in the table editor window, or in a separate dialog window.
You can choose how you wish to display this information.
ii) An Update button is added for each text field in the display, which will attempt to update the corresponding field in the database table, from the current data in the textfield. The following code will retrieve the current value from a JTextField object:
String newValue = textfieldName.getText();
The following code will convert the string to a number:
int newNumber = Integer.parseInt(newValue);
Remember, an attempt to update a row in a table may fail if eg it tries to alter a
foreign key to a value not currently recorded for any corresponding primary key
that the foreign key refers to.
An attempt to set a foreign key field to 'null' should always be successful.
If the update attempt fails, the value in the displayed text field should revert to its
original state, to maintain consistency with the database.
import java.io.*;
import java.sql.*;
import java.util.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import oracle.jdbc.driver.*;
* class JdbcCW
* demonstration of Java client connecting to an Oracle DBMS
* @author put your name here
* @date December 2002
public class JdbcCW extends JFrame{
static String url = "jdbc:oracle:thin:@localhost:1521:orcl";
static String initialquery = "select table_name from user_tables";
static String nullstring = "null";
private String user;
private String pass;
private Connection conn;
private Statement stmt;
private ResultSet results;
private JComboBox tableChooser;
private JButton editButton;
private JButton exitButton;
private JButton detailsButton;
private JPanel panel1;
private JPanel panel2;
private String selectedTable;
private Container cp;
public static void main(String[] args) throws SQLException {
JdbcCW demo = new JdbcCW();
demo.show();
* JdbcCW constructor method
public JdbcCW() throws SQLException {
super("Java/Oracle coursework");
addWindowListener (new WindowAdapter() {
public void windowClosing (WindowEvent evt) {
System.exit(0);
try {
user =
JOptionPane.showInputDialog("enter oracle username eg ops$c9999999");
pass = JOptionPane.showInputDialog("enter oracle password eg 29feb80");
if ( user.length() == 0 || pass.length() == 0)
throw new Exception("no user name and/or password");
DriverManager.registerDriver (new OracleDriver());
conn = DriverManager.getConnection(url, user, pass);
if (conn != null)
System.out.println("Connected");
catch (Exception e ) {
e.printStackTrace();
System.exit(0); // problems - abandon ship
// now we can access tables in the database
stmt = conn.createStatement();
results = stmt.executeQuery(initialquery);
boolean anyRecords = results.next();
if ( ! anyRecords ) {
JOptionPane.showMessageDialog (this, "No Tables in the database");
System.exit(0);
tableChooser = new JComboBox();
do
tableChooser.addItem(results.getString(1));
while (results.next() ) ;
selectedTable = (String) tableChooser.getSelectedItem();
tableChooser.addActionListener (new ActionListener () {
public void actionPerformed (ActionEvent evt) {
     changeTable();
editButton = new JButton("Edit");
editButton.addActionListener(new ActionListener () {
public void actionPerformed(ActionEvent evt) {
     runEdit();
exitButton = new JButton("Exit");
exitButton.addActionListener(new ActionListener () {
public void actionPerformed(ActionEvent evt) {
System.exit(0);
panel1 = new JPanel(); // panels have flow layout
JLabel label1 = new JLabel("Choose Table");
panel1.add(label1);
panel1.add(tableChooser);
panel2 = new JPanel();
panel2.add(editButton);
panel2.add(exitButton);
cp = getContentPane();
cp.add(panel1,BorderLayout.NORTH);
cp.add(panel2,BorderLayout.SOUTH);
setSize(300,200);
setLocation(100,100);
private void changeTable() {
selectedTable = (String) tableChooser.getSelectedItem();
* method runEdit runs a query to determine the structure of the
* selected table in order to customise the table editor window
private void runEdit() {
System.out.println("Selected Table " + selectedTable);
String query = "select column_name,data_type from user_tab_columns " +
     "where table_name = '" + selectedTable + "'";
try {
     results = stmt.executeQuery(query);
} catch (java.sql.SQLException e) {
     System.out.println("SQL Exception on query " + query);
     return;
JdbcEdit tableEditor = new JdbcEdit(this,selectedTable,results);
tableEditor.show();
public ResultSet makeQuery(String query) {
     ResultSet results;
     try {
     results = stmt.executeQuery(query);
     } catch (SQLException e) {
     System.out.println("Query Failed " + query);
     return null;
     return results;
} // end class JdbcGen
* class JdbcEdit
* oracle table editing dialog window
* @author put your name here as well
* @date December 2002
class JdbcEdit extends JDialog {
private JdbcCW parent;
private Container cp;
private Vector columnNames;
private Vector dataTypes;
private Vector editFields;
private Vector rows;
private int noOfColumns;
private int currentRow = 0;
* JdbcEdit constructor method
* the parameter true makes the dialog window modal -
* the parent frame is inactive as long as this window is displayed
public JdbcEdit (JdbcCW parent, String tableName, ResultSet results) {
     super(parent,"table editor " + tableName, true);
     this.parent = parent;
columnNames = new Vector();
dataTypes = new Vector();
     editFields = new Vector();
     JPanel mainPanel = new JPanel();
     mainPanel.setLayout(new BoxLayout(mainPanel,BoxLayout.Y_AXIS));
// boxLayout - components are added to mainPanel in a vertical stack
     try {
     boolean anyRecords = results.next();
     if ( ! anyRecords ) {
          JOptionPane.showMessageDialog (this, "No Detail for " +
                         tableName+ " in the database");
          return;
     do {
          String columnName = results.getString(1);
          String dataType = results.getString(2);
          System.out.println("Row " + columnName + " Type " + dataType);
          JPanel editPanel = new JPanel();
          JLabel colNameLabel = new JLabel(columnName);
          JTextField dataField = new JTextField(20);
          editPanel.add(colNameLabel);
          editPanel.add(dataField);
// this would be a good place to add an Update button
          mainPanel.add(editPanel);
// now store the columnName, dataType and data text field
// in vectors so other methods can access them
// at this point in time the text field is empty
          columnNames.add(columnName);
          dataTypes.add(dataType);
     editFields.add(dataField);
     }while (results.next() ) ;
     } catch (java.sql.SQLException e) {
     System.out.println("SQL Exception on query ");
     return;
// get the data from the Oracle table and put the first
// row of data in the text fields in the dialog window
     populateData(tableName);
// find out which column(s) are part of the primary key and make these
// textfields non-editable so the values can't be changed
findPKConstraints(tableName);
// this would be a good place to discover any foreign key constraints
     JPanel buttonsPanel = new JPanel();
     JButton exitButton = new JButton("Exit");
     exitButton.addActionListener(new ActionListener () {
     public void actionPerformed(ActionEvent evt) {
          closeWindow();
     JButton nextButton = new JButton("Next");
     nextButton.addActionListener(new ActionListener () {
     public void actionPerformed(ActionEvent evt) {
          showRow(true);
     JButton prevButton = new JButton("Prev");
     prevButton.addActionListener(new ActionListener () {
     public void actionPerformed(ActionEvent evt) {
          showRow(false);
     buttonsPanel.add(exitButton);
     buttonsPanel.add(nextButton);
     buttonsPanel.add(prevButton);
cp = getContentPane();
     cp.add(mainPanel,BorderLayout.CENTER);
     cp.add(buttonsPanel,BorderLayout.SOUTH);
     pack();
private void closeWindow() {
     dispose();
private void populateData(String tableName) {
int noOfColumns;
// have to access the Statement object in the parent frame
     ResultSet tableData = parent.makeQuery("select * from " + tableName);
     try {
     boolean anyRecords = tableData.next();
     if ( ! anyRecords ) {
          JOptionPane.showMessageDialog (this, "No data in " +
                         tableName);
          return;
     rows = new Vector();
noOfColumns = columnNames.size();
     do {
          String [] row = new String[noOfColumns];
          for (int i = 0; i < noOfColumns; i++) {        
          row[i] = tableData.getString(i+1);
          rows.add(row);
     } while (tableData.next() ) ;
     } catch (java.sql.SQLException e) {
     System.out.println("SQL Exception on query ");
     return;
// Put the first row of data from the table into the test fields;
     String [] rowData = (String[]) rows.get(0);
     for (int i = 0; i < noOfColumns; i++) {
// get the reference to a text field in the dialog window
JTextField textField = (JTextField) editFields.get(i);
// vector editFields holds a reference to each JTextField
// in the visible dialog window
// hence the next line of code puts the data retrieved from
// the table into the relevant text field in the GUI interface
     textField.setText(rowData);
// method showRow updates the textfields in the GUI interface
// with the next row of data from the table ( if next is true)
// or with the previous row of data from the table ( if next is false)
private void showRow(boolean next) {
if ( rows == null ) {
System.out.println("table is empty");
     getToolkit().beep();
     return;
     if (next && currentRow < rows.size() - 1) {
     currentRow++;
     } else if (!next && currentRow > 0) {
     currentRow--;
     } else {
     System.out.println("No Next/Prev row " + currentRow);
     getToolkit().beep();
     return;
     String [] rowData = (String[]) rows.get(currentRow);
int noOfAttributes = dataTypes.size();
     for (int i = 0; i < noOfAttributes; i++) {
     JTextField textField = (JTextField) editFields.get(i);
     textField.setText(rowData[i]);
private void findPKConstraints(String tableName){
     String PK_ConstraintName = "none";
     String pkquery =
"select owner,constraint_name from user_constraints " +
     "where table_name = '" + tableName + "' and constraint_type = 'P'";
// have to access the Statement object in the parent frame
     ResultSet results = parent.makeQuery(pkquery);
     try {
     boolean anyRecords = results.next();
     if ( ! anyRecords ) {
          // if none just return - but print a debug message
          System.out.println("No primary key constraint found");
          return;
     } else {
          // There should only be one
          System.out.println("Owner = " + results.getString(1) +
                    " name = " + results.getString(2));
          PK_ConstraintName = results.getString(2);
          // Now find out which columns
          pkquery =
"select Column_name, position from user_cons_columns"
          + " where constraint_name = '" + PK_ConstraintName
          + "'";
// have to access the Statement object in the parent frame
          results = parent.makeQuery(pkquery);
          anyRecords = results.next();
          if ( ! anyRecords ) {
          // if none just return - but there must be at least one
          System.out.println("no columns found");
          return;
          } else {
          do {
               System.out.println
("Name " + results.getString(1) +
               " position " + results.getString(2))
               int position = Integer.parseInt(results.getString(2));
               JTextField primarykey =
(JTextField)editFields.get(position - 1);
               primarykey.setEditable(false);
          } while (results.next());
     } catch (java.sql.SQLException e) {
     System.out.println("SQL Exception on query " + pkquery);
     return;

You're pretty optimistic if you think anyone is going to answer that. There are three very good reasons not to (each is good enough by themselves!).
1. IT'S YOUR HOMEWORK, IT DOESN'T EVEN LOOK AS THOUGH YOU'VE TRIED. WE HELP WITH PROBLEMS, NOT PROVIDE SOLUTIONS, ESPECIALLY FOR HOMEWORK.
2. Format your code. Use [ code] and [ /code] (without the spaces). And if you've used 'i' as an index variable, [ i] will result in switching to italics mode. Use 'j' as your index variable.
3. Don't post your whole program, only the parts you're having trouble with (mostly not relevant for this question, as you don't seem to have trouble with any particular area)

Similar Messages

  • Please! help me with this wrong code, where is mistake

    please! help me with this wrong code, where is mistake?
    import java.util.Stack;
    public class KnightsTour {
    Vars locs[];
    private int size, max=1, d=0, board[][];
    public KnightsTour(int x,int y, int newSize)
         size=newSize;
         locs=new Vars[size*size+1];
         for(int n=1;n<=size*size;n++)
              locs[n]=new Vars();
         board=new int[size+1][size+1];
         for(int n=1;n<=size;n++)
              for(int n2=1;n2<=size;n2++)
                   board[n][n2]=0;
         locs[max].x=x;
         locs[max].y=y;
         locs[max].d=1;
         board[x][y]=max;
         max++;
    class Vars{
         int x;
         int y;
         int d;
    public void GO()
         int n=0;
         while(max<=size*size)
              n++;
              d++;
              if(d>8)
                   max--;
                   board[locs[max].x][locs[max].y]=0;
                   d=locs[max].d+1;
              move();
         printBoard();
    public void move()
         int x=locs[max-1].x, y=locs[max-1].y;
         switch(d)
         case 1:x--;y-=2;break;
         case 2:x++;y-=2;break;
         case 3:x+=2;y--;break;
         case 4:x+=2;y++;break;
         case 5:x++;y+=2;break;
         case 6:x--;y+=2;break;
         case 7:x-=2;y++;break;
         case 8:x-=2;y--;break;
         //System.out.println(" X: "+x+" Y: "+y+" |"+max);
         if((x<1)||(x>size)||(y<1)||(y>size)){}
         else if(board[x][y]!=0){}
         else
              locs[max].x=x;
              locs[max].y=y;
              locs[max].d=d;
              board[x][y]=max;
              max++;
              d=0;
              //printBoard();
    public void printBoard()
         for(int n=1;n<=size;n++)
              for(int n2=1;n2<=size;n2++)
                   if(board[n2][n]<10)
                        System.out.print(board[n2][n]+" ");
                   else
                        System.out.print(board[n2][n]+" ");
              System.out.println();
         //System.out.println();
         System.out.println();
         public static void main (String[]args){
              KnightsTour k = new KnightsTour(1,1,8);
         }

    public class KnightsTour {
        Vars locs[];
        private int size,  max = 1,  d = 0,  board[][];
        public static void main (String[] args) {
            KnightsTour k = new KnightsTour (1, 1, 8);
            k.GO ();
        public KnightsTour (int x, int y, int newSize) {
            size = newSize;
            locs = new Vars[size * size + 1];
            for (int n = 1; n <= size * size; n++) {
                locs[n] = new Vars ();
            board = new int[size + 1][size + 1];
            for (int n = 1; n <= size; n++) {
                for (int n2 = 1; n2 <= size; n2++) {
                    board[n][n2] = 0;
            locs[max].x = x;
            locs[max].y = y;
            locs[max].d = 1;
            board[x][y] = max;
            max++;
        class Vars {
            int x;
            int y;
            int d;
        public void GO () {
            int n = 0;
            while (max <= size * size) {
                n++;
                d++;
                if (d > 8) {
                    max--;
                    board[locs[max].x][locs[max].y] = 0;
                    d = locs[max].d + 1;
                move ();
            printBoard ();
        public void move () {
            int x = locs[max - 1].x, y = locs[max - 1].y;
            switch (d) {
                case 1:
                    x--;
                    y -= 2;
                    break;
                case 2:
                    x++;
                    y -= 2;
                    break;
                case 3:
                    x += 2;
                    y--;
                    break;
                case 4:
                    x += 2;
                    y++;
                    break;
                case 5:
                    x++;
                    y += 2;
                    break;
                case 6:
                    x--;
                    y += 2;
                    break;
                case 7:
                    x -= 2;
                    y++;
                    break;
                case 8:
                    x -= 2;
                    y--;
                    break;
    //System.out.println(" X: "x" Y: "y" |"+max);
            if ((x < 1) || (x > size) || (y < 1) || (y > size)) {
            } else if (board[x][y] != 0) {
            } else {
                locs[max].x = x;
                locs[max].y = y;
                locs[max].d = d;
                board[x][y] = max;
                max++;
                d = 0;
    //printBoard();
        public void printBoard () {
            for (int n = 1; n <= size; n++) {
                for (int n2 = 1; n2 <= size; n2++) {
                    if (board[n2][n] < 10) {
                        System.out.print (board[n2][n] + " ");
                    } else {
                        System.out.print (board[n2][n] + " ");
                System.out.println ();
    //System.out.println();
            System.out.println ();
    }formatting ftw.
    If you call GO () you get in an infinite loop. max gets decreased, and it loops while max is smaller then or equal to size * size. Is your looping logic correct ?

  • HT1494 hi....i  cant continuously play my music with my ipod nano....i tried a lot with the settings for wake time but still it is pausing the music path.Please anybody help me with this issue

    hi....i  cant continuously play my music with my ipod nano....i tried a lot with the settings for wake time but still it is pausing the music path.Please anybody help me with this issue

    Is this your problem?
    iPod nano (6th generation): Music stops when display turns off
    B-rock

  • Can somebody help me with this code?

    Can anyone help me with this code? My problem is that i can't
    seem to position this form, i want to be able to center it
    vertically & horizontally in a div either using CSS or any
    other means.
    <div id="searchbar"><!--Search Bar -->
    <div id="searchcart">
    <div class="serchcartcont">
    <form action='
    http://www.romancart.com/search.asp'
    name="engine" target=searchwin id="engine">
    <input type=hidden value=????? name=storeid>
    <input type=text value='' name=searchterm>
    <input type=submit value='Go'> </form>
    </div>
    </div>
    <div class="searchcont">Search For
    Products:</div>
    </div><!-- End Search Bar -->
    Pleasssssseeeeeeee Help
    Thanks

    Hi,
    Your form is defined in a div named "serchcartcont", you can
    use attributes like position and align of the div to do what you
    want to do. But there are two more dives above this dive, you will
    have define the height width of these before you can center align
    the inner most div. If you are not defining the height & width
    then by default it decide it automatically to just fit the content
    in it.
    Hope this helps.
    Maneet
    LeXolution IT Services
    Web Development
    Company

  • Please GOD somebody help me with this session

    I went to a Track to use an EQ and now my whole session will not display only the EQ window I was using!! has anyone ever had this issue??

    hit cmd-1.

  • Somebody help me with this ??

    Hi,
    I need your help, please.
    When execute this code:
    File dir = new File("c:\\paso");
    File[] files = dir.listFiles();
    I see "files" and the content is this: "[Ljava.io.File;@111f71".
      How I can see the name of the File ??
      How I can run a program with the parameter from one by one from the files reader ???
    Thank's.
    Hervey P.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    Hi,
    files is a File array object and as such has no interesting internal string representation other
    than what you've already seen.
    Looping through the array will get you individual File objects which similiarily have
    little interesting information when examined.
    However if you use files.getName() this will return a String of the name of the file and
    files[i].getParent() will return a String of the path (if one exists)
    Reading the JavaDoc on java.io.File is recommended

  • Please someone help me with this or other wise im gonna return my ipod

    please a little help here. i've been trying this since last night and still i cant figure it out. my music videos don't have any sound at all. i've chequed the volume and the settings and still cant hear anything its driving me crazy!!

    Quicktime, Quicktime Pro and iTunes don't convert "muxed" ( muxed means multiplexed where the audio and video are stored on the same track) video files properly. It only plays the video and not the audio.
    See:iPod plays video but not audio.
    You need a 3rd party converter to convert the file with both audio and video.
    Search this forum for recommendations, but beware of spammers trying to sell you their own product.

  • Please someone help me with this code..

    hi, i have a big problem trying to figure out how to do this, i get this code somewhere in the net, so it's not me who code this, that's why i got this problem.
    this is a MIDlet games, something like gallaga. i like to add some features like the UP and DOWN movement and also i have a problem with his "fire", i can only shoot once after the fire image is gone in the screen, what i liked to have is even i pressed the fire button and press it again the fire will not gone, what i mean continues fire if i pressed everytime the fire button.
    i will post the code here so you can see it and give me some feedback. i need this badly, hoping to all you guys! thanks..for this forum.
    ----CODE BEGIN ---------------
    import java.io.IOException;
    import java.io.PrintStream;
    import java.util.Random;
    import javax.microedition.lcdui.*;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    import javax.microedition.rms.RecordStore;
    import javax.microedition.rms.RecordStoreException;
    public class MobileGalaga extends MIDlet
    implements CommandListener, Runnable
    class ScoreScreen extends Canvas
    public void paint(Graphics g)
    g.setColor(0xffffff);
    g.fillRect(0, 0, MobileGalaga.WIDTH, MobileGalaga.HEIGHT);
    g.setColor(0x160291);
    g.setFont(MobileGalaga.fs);
    g.drawString("Help", MobileGalaga.CENTERW, 2, 17);
    g.setColor(0);
    g.drawString("Use left/right and fire", MobileGalaga.CENTERW, 20, 17);
    g.drawString("to destory the", MobileGalaga.CENTERW, 30, 17);
    g.drawString("incoming alien MobileGalaga", MobileGalaga.CENTERW, 40, 17);
    public void keyPressed(int i)
    int j = getGameAction(i);
    if(j == 8)
    display.setCurrent(titlescreen);
    ScoreScreen()
    class TitleScreen extends Canvas
    public void paint(Graphics g)
    g.setColor(0xffffff);
    g.fillRect(0, 0, MobileGalaga.WIDTH, MobileGalaga.HEIGHT);
    g.drawImage(MobileGalaga.logoimg, MobileGalaga.CENTERW, 15, 17);
    g.setColor(0);
    g.setFont(MobileGalaga.fs);
    g.drawString("Press 5 to", MobileGalaga.CENTERW, 43, 17);
    g.drawString("see help", MobileGalaga.CENTERW, 53, 17);
    public void keyPressed(int i)
    int j = getGameAction(i);
    if(j == 8)
    display.setCurrent(scorescreen);
    TitleScreen()
    class MainScreen extends Canvas
    public void paint(Graphics g)
    offg.setColor(0xffffff);
    offg.fillRect(0, 0, MobileGalaga.WIDTH, MobileGalaga.HEIGHT);
    for(int i = 0; i < MobileGalaga.slen; i++)
    if(!MobileGalaga.dead)
    offg.drawImage(MobileGalaga.alienimg[MobileGalaga.frame[i]], MobileGalaga.x[i], MobileGalaga.y[i], 17);
    if(!MobileGalaga.playerdead)
    offg.drawImage(MobileGalaga.playerimg, MobileGalaga.px, MobileGalaga.py, 17);
    } else
    if(MobileGalaga.explodeframe < 3)
    offg.drawImage(MobileGalaga.explosionimg[MobileGalaga.explodeframe], MobileGalaga.px, MobileGalaga.py, 17);
    MobileGalaga.explodeframe++;
    if(!MobileGalaga.gameover)
    MobileGalaga.playerpause++;
    if(MobileGalaga.playerpause < 50)
    MobileGalaga.playerpause++;
    } else
    MobileGalaga.playerdead = false;
    MobileGalaga.playerpause = 0;
    MobileGalaga.px = MobileGalaga.CENTERW;
    offg.setColor(0);
    offg.drawString(MobileGalaga.scorestr, MobileGalaga.WIDTH, 0, 24);
    offg.drawImage(MobileGalaga.playerimg, 0, 0, 20);
    offg.drawString(MobileGalaga.lives + "", 12, 0, 20);
    if(MobileGalaga.laser)
    offg.drawLine(MobileGalaga.laserx, MobileGalaga.lasery, MobileGalaga.laserx, MobileGalaga.lasery + 4);
    if(MobileGalaga.showscores)
    for(int j = 0; j < 5; j++)
    if(j == MobileGalaga.rank)
    offg.setColor(0xff0000);
    else
    offg.setColor(0);
    offg.drawString((j + 1) + " .... " + getScoreStr(MobileGalaga.highscore[j]), MobileGalaga.CENTERW, 20 + j * 10, 17);
    if(MobileGalaga.showmessage)
    offg.setColor(0xff0000);
    offg.drawString(MobileGalaga.msg, MobileGalaga.CENTERW, MobileGalaga.CENTERH, 17);
    MobileGalaga.messagepause++;
    if(MobileGalaga.messagepause > 20)
    MobileGalaga.showmessage = false;
    MobileGalaga.messagepause = 0;
    if(MobileGalaga.gameover)
    MobileGalaga.showscores = true;
    else
    if(MobileGalaga.wavecomplete)
    initWave();
    g.drawImage(offimg, 0, 0, 20);
    public void keyPressed(int i)
    int j = getGameAction(i);
    if(j == 2)
    MobileGalaga.playerLeft = true;
    else
    if(j == 5)
    MobileGalaga.playerRight = true;
    else
    if(j == 8)
    fireLaser();
    public void keyReleased(int i)
    int j = getGameAction(i);
    if(j == 2)
    MobileGalaga.playerLeft = false;
    else
    if(j == 5)
    MobileGalaga.playerRight = false;
    private Image offimg;
    private Graphics offg;
    public MainScreen()
    offimg = Image.createImage(getWidth(), getHeight());
    offg = offimg.getGraphics();
    offg.setFont(MobileGalaga.fs);
    public MobileGalaga()
    rand = new Random();
    display = Display.getDisplay(this);
    mainscreen = new MainScreen();
    titlescreen = new TitleScreen();
    scorescreen = new ScoreScreen();
    WIDTH = mainscreen.getWidth();
    HEIGHT = mainscreen.getHeight();
    CENTERW = WIDTH / 2;
    CENTERH = HEIGHT / 2;
    exitCommand = new Command("Exit", 7, 1);
    playCommand = new Command("Play", 1, 1);
    quitCommand = new Command("Quit", 1, 1);
    againCommand = new Command("Again", 1, 1);
    nullCommand = new Command("", 1, 1);
    try
    alienimg[0] = Image.createImage("/alien1.png");
    alienimg[1] = Image.createImage("/alien2.png");
    explosionimg[0] = Image.createImage("/explosion1.png");
    explosionimg[1] = Image.createImage("/explosion2.png");
    explosionimg[2] = Image.createImage("/explosion3.png");
    playerimg = Image.createImage("/player.png");
    logoimg = Image.createImage("/logo.png");
    catch(IOException ioexception)
    db("Couldn't get images!");
    imgW = alienimg[0].getWidth();
    imgH = alienimg[0].getHeight();
    edgeH = imgW / 2;
    edgeV = imgH / 2;
    pimgW = playerimg.getWidth();
    pimgH = playerimg.getHeight();
    pedgeH = pimgW / 2;
    pedgeV = pimgH / 2;
    highscore = getHighScores();
    public void run()
    while(runner)
    rp();
    updatePos();
    try
    MobileGalaga _tmp = this;
    Thread.sleep(75L);
    catch(InterruptedException interruptedexception)
    db("interrupted");
    runner = false;
    MobileGalaga _tmp1 = this;
    Thread.yield();
    public void startApp()
    throws MIDletStateChangeException
    display.setCurrent(titlescreen);
    addBeginCommands(titlescreen, false);
    addBeginCommands(scorescreen, false);
    addPlayCommands(mainscreen, false);
    public void pauseApp()
    public void destroyApp(boolean flag)
    runner = false;
    th = null;
    private void rp()
    mainscreen.repaint();
    private void startGame()
    initGame();
    if(th == null)
    th = new Thread(this);
    runner = true;
    th.start();
    private void initGame()
    px = CENTERW;
    py = HEIGHT - pedgeV - pimgH;
    packcount = 0;
    lives = 3;
    score = 0;
    scorestr = "000000";
    rank = -1;
    difficulty = 400;
    wave = 1;
    initWave();
    private void initWave()
    for(int i = 0; i < slen; i++)
    frame[i] = i % 2;
    x[i] = packX[i] = sposX[i];
    y[i] = packY[i] = sposY[i];
    dx[i] = packdx = alien_dx_right;
    dy[i] = packdy = alien_dy_right;
    dxcount[i] = dycount[i] = 0;
    pmode[i] = 0;
    flying[i] = false;
    dead[i] = false;
    playerLeft = false;
    playerRight = false;
    laser = false;
    playerdead = false;
    showscores = false;
    showmessage = false;
    gameover = false;
    wavecomplete = false;
    playerpause = 0;
    messagepause = 0;
    killed = 0;
    private void updatePos()
    if(playerLeft)
    updatePlayerPos(-2);
    else
    if(playerRight)
    updatePlayerPos(2);
    fly = Math.abs(rand.nextInt() % difficulty);
    if(fly < slen && !flying[fly] && !dead[fly])
    if(x[fly] < CENTERW)
    setDX(fly, alien_dx_flyright, 2);
    setDY(fly, alien_dy_flyright, 2);
    } else
    setDX(fly, alien_dx_flyleft, 2);
    setDY(fly, alien_dy_flyleft, 2);
    flying[fly] = true;
    for(int i = 0; i < slen; i++)
    if(!dead[i])
    if(!flying[i])
    if(x[i] + edgeH + dx[i][dxcount[i]] > WIDTH)
    changePackDir(alien_dx_left, alien_dy_left);
    if((x[i] - edgeH) + dx[i][dxcount[i]] < 0)
    changePackDir(alien_dx_right, alien_dy_right);
    } else
    if(y[i] + edgeV + dy[i][dycount[i]] > HEIGHT)
    x[i] = packX[i];
    y[i] = packY[i];
    flying[i] = false;
    setDX(i, packdx, 0);
    setDY(i, packdy, 0);
    if(!playerdead && y[i] <= py + pedgeV && y[i] >= py - pedgeV && x[i] <= px + pedgeH && x[i] >= px - pedgeH)
    playerHit();
    if(laser && lasery <= y[i] + edgeV && lasery >= y[i] - edgeV && laserx <= x[i] + edgeH && laserx >= x[i] - edgeH)
    alienHit(i);
    for(int j = 0; j < slen; j++)
    if(!dead[j])
    if(framecount == 3)
    frame[j] = frame[j] + 1 < 2 ? 1 : 0;
    lastx = x[j];
    lasty = y[j];
    x[j] += dx[j][dxcount[j]];
    y[j] += dy[j][dycount[j]];
    if(pmode[j] == 0)
    dxcount[j] = dxcount[j] + 1 < dx[j].length ? dxcount[j] + 1 : 0;
    dycount[j] = dycount[j] + 1 < dy[j].length ? dycount[j] + 1 : 0;
    } else
    if(pmode[j] == 2)
    dxcount[j] = dxcount[j] + 1 < dx[j].length ? dxcount[j] + 1 : dxcount[j];
    dycount[j] = dycount[j] + 1 < dy[j].length ? dycount[j] + 1 : dycount[j];
    packX[j] += packdx[packcount];
    packY[j] += packdy[packcount];
    packcount = packcount + 1 < packlen ? packcount + 1 : 0;
    framecount = framecount + 1 < 4 ? framecount + 1 : 0;
    if(laser)
    lasery -= 6;
    if(lasery < 0)
    laser = false;
    private void setDX(int i, int ai[], int j)
    if(i == -1)
    for(int k = 0; k < slen; k++)
    if(!flying[k])
    dx[k] = ai;
    dxcount[k] = 0;
    pmode[k] = j;
    } else
    dx[i] = ai;
    dxcount[i] = 0;
    pmode[i] = j;
    private void setDY(int i, int ai[], int j)
    if(i == -1)
    for(int k = 0; k < slen; k++)
    if(!flying[k])
    dy[k] = ai;
    dycount[k] = 0;
    pmode[k] = j;
    } else
    dy[i] = ai;
    dycount[i] = 0;
    pmode[i] = j;
    private void changePackDir(int ai[], int ai1[])
    setDX(-1, ai, 0);
    setDY(-1, ai1, 0);
    packdx = ai;
    packdy = ai1;
    packcount = 0;
    private void updatePlayerPos(int i)
    plastx = px;
    px += i;
    if(px + pedgeH > WIDTH || px - pedgeH < 0)
    px = plastx;
    private void fireLaser()
    if(!laser)
    laser = true;
    laserx = px;
    lasery = py;
    private void alienHit(int i)
    if(!playerdead)
    dead[i] = true;
    laser = false;
    killed++;
    if(flying[i])
    score += 200;
    else
    score += 50;
    if(killed == slen)
    waveComplete();
    scorestr = getScoreStr(score);
    private void playerHit()
    playerdead = true;
    playerpause = 0;
    explodeframe = 0;
    lives--;
    if(lives == 0)
    gameOver();
    private void waveComplete()
    wavecomplete = true;
    difficulty -= 100;
    if(difficulty < 100)
    difficulty = 100;
    msg = "WAVE " + wave + " COMPLETE";
    messagepause = 0;
    showmessage = true;
    wave++;
    score += 1000 * wave;
    scorestr = getScoreStr(score);
    private void gameOver()
    gameover = true;
    msg = "GAME OVER";
    for(int i = 0; i < 5; i++)
    if(score < highscore[i])
    continue;
    for(int j = 4; j > i; j--)
    highscore[j] = highscore[j - 1];
    highscore[i] = score;
    rank = i;
    break;
    setHighScores();
    showmessage = true;
    messagepause = 0;
    addEndCommands(mainscreen, true);
    private void addBeginCommands(Displayable displayable, boolean flag)
    if(flag)
    removeCommands();
    displayable.addCommand(playCommand);
    displayable.addCommand(exitCommand);
    displayable.setCommandListener(this);
    private void addPlayCommands(Displayable displayable, boolean flag)
    if(flag)
    removeCommands();
    displayable.addCommand(nullCommand);
    displayable.addCommand(quitCommand);
    displayable.setCommandListener(this);
    private void addEndCommands(Displayable displayable, boolean flag)
    if(flag)
    removeCommands();
    displayable.addCommand(againCommand);
    displayable.addCommand(quitCommand);
    displayable.setCommandListener(this);
    private void removeCommands()
    Displayable displayable = display.getCurrent();
    displayable.removeCommand(nullCommand);
    displayable.removeCommand(quitCommand);
    displayable.removeCommand(againCommand);
    displayable.removeCommand(playCommand);
    displayable.removeCommand(exitCommand);
    public void commandAction(Command command, Displayable displayable)
    if(command == playCommand)
    display.setCurrent(mainscreen);
    startGame();
    if(command == quitCommand)
    runner = false;
    while(th.isAlive()) ;
    th = null;
    addPlayCommands(mainscreen, true);
    display.setCurrent(titlescreen);
    if(command == againCommand)
    runner = false;
    while(th.isAlive()) ;
    th = null;
    display.setCurrent(mainscreen);
    addPlayCommands(mainscreen, true);
    startGame();
    if(command == exitCommand)
    destroyApp(false);
    notifyDestroyed();
    private int[] getHighScores()
    int ai[] = new int[5];
    ai[0] = 5000;
    ai[1] = 4000;
    ai[2] = 3000;
    ai[3] = 2000;
    ai[4] = 1000;
    byte abyte0[][] = new byte[5][6];
    try
    hsdata = RecordStore.openRecordStore("MobileGalaga", true);
    int i = hsdata.getNumRecords();
    if(i == 0)
    for(int j = 0; j < 5; j++)
    abyte0[j] = Integer.toString(ai[j]).getBytes();
    hsdata.addRecord(abyte0[j], 0, abyte0[j].length);
    } else
    for(int k = 0; k < 5; k++)
    abyte0[k] = hsdata.getRecord(k + 1);
    String s = "";
    for(int l = 0; l < abyte0[k].length; l++)
    s = s + (char)abyte0[k][l] + "";
    ai[k] = Integer.parseInt(s);
    catch(RecordStoreException recordstoreexception)
    db("problem with initialising highscore data\n" + recordstoreexception);
    return ai;
    private void setHighScores()
    byte abyte0[][] = new byte[5][6];
    try
    hsdata = RecordStore.openRecordStore("MobileGalaga", true);
    for(int i = 0; i < 5; i++)
    abyte0[i] = Integer.toString(highscore[i]).getBytes();
    hsdata.setRecord(i + 1, abyte0[i], 0, abyte0[i].length);
    catch(RecordStoreException recordstoreexception)
    db("problem with setting highscore data\n" + recordstoreexception);
    private String getScoreStr(int i)
    templen = 6 - (i + "").length();
    tempstr = "";
    for(int j = 0; j < templen; j++)
    tempstr = tempstr + "0";
    return tempstr + i;
    public static void db(String s)
    System.out.println(s);
    public static void db(int i)
    System.out.println(i + "");
    private Display display;
    private Command exitCommand;
    private Command playCommand;
    private Command quitCommand;
    private Command againCommand;
    private Command nullCommand;
    private MainScreen mainscreen;
    private TitleScreen titlescreen;
    private ScoreScreen scorescreen;
    private static int WIDTH;
    private static int HEIGHT;
    private static int CENTERW;
    private static int CENTERH;
    private boolean runner;
    private Thread th;
    private Random rand;
    private static final int RED = 0xff0000;
    private static final int ORANGE = 0xff9100;
    private static final int YELLOW = 0xffff00;
    private static final int WHITE = 0xffffff;
    private static final int BLACK = 0;
    private static final int BLUE = 0x160291;
    private static Image alienimg[] = new Image[2];
    private static Image explosionimg[] = new Image[3];
    private static Image playerimg;
    private static Image logoimg;
    private static int imgH;
    private static int imgW;
    private static int pimgH;
    private static int pimgW;
    private static int edgeH;
    private static int edgeV;
    private static int pedgeH;
    private static int pedgeV;
    private static final Font fs = Font.getFont(64, 0, 8);
    private static final Font fl = Font.getFont(64, 1, 16);
    private static final int sposX[] = {
    16, 28, 40, 52, 4, 16, 28, 40, 52, 64,
    4, 16, 28, 40, 52, 64
    private static final int sposY[] = {
    14, 14, 14, 14, 26, 26, 26, 26, 26, 26,
    38, 38, 38, 38, 38, 38
    private static final int LOOP = 0;
    private static final int ONCE = 1;
    private static final int HOLD = 2;
    private static final int move_none[] = {
    0
    private static final int alien_dx_right[] = {
    1, 1, 1, 1, 1, 1, 1, 1
    private static final int alien_dy_right[] = {
    0, 0, 1, 1, 0, 0, -1, -1
    private static final int alien_dx_left[] = {
    -1, -1, -1, -1, -1, -1, -1, -1
    private static final int alien_dy_left[] = {
    0, 0, -1, -1, 0, 0, 1, 1
    private static final int alien_dx_flyright[] = {
    1, 1, 1, 0, -1, -1, -1, -1, -1, 0,
    1, 1, 2, 3, 4, 5, 6
    private static final int alien_dy_flyright[] = {
    0, -1, -1, -1, -1, -1, 0, 1, 1, 1,
    1, 1, 2, 3, 4, 5, 6
    private static final int alien_dx_flyleft[] = {
    -1, -1, -1, 0, 1, 1, 1, 1, 1, 0,
    -1, -1, -2, -3, -4, -5, -6
    private static final int alien_dy_flyleft[] = {
    0, -1, -1, -1, -1, -1, 0, 1, 1, 1,
    1, 1, 2, 3, 4, 5, 6
    private static final int slen;
    private static final int ailen;
    private static final int packlen;
    private static int pmode[];
    private static int x[];
    private static int y[];
    private static int dx[][];
    private static int dy[][];
    private static int dxcount[];
    private static int dycount[];
    private static int frame[];
    private static boolean flying[];
    private static boolean dead[];
    private static boolean exploding[];
    private static int lastx;
    private static int lasty;
    private static int fly;
    private static int packX[];
    private static int packY[];
    private static int packdx[];
    private static int packdy[];
    private static int packcount;
    private static int framecount = 3;
    private static int px;
    private static int py;
    private static int plastx;
    private static int score;
    private static String scorestr;
    private static int lives;
    private static int killed;
    private static boolean playerdead;
    private static int explodeframe;
    private static int playerpause;
    private static int rank;
    private static boolean playerLeft;
    private static boolean playerRight;
    private static boolean laser;
    private static int laserx;
    private static int lasery;
    private static RecordStore hsdata;
    private static int highscore[] = new int[5];
    private static boolean showmessage;
    private static boolean showscores;
    private static boolean gameover;
    private static boolean wavecomplete;
    private static int messagepause;
    private static String msg;
    private static int difficulty;
    private static int wave;
    private static String tempstr;
    private static int templen;
    static
    slen = sposX.length;
    ailen = alien_dx_flyright.length;
    packlen = alien_dx_right.length;
    pmode = new int[slen];
    x = new int[slen];
    y = new int[slen];
    dx = new int[slen][ailen];
    dy = new int[slen][ailen];
    dxcount = new int[slen];
    dycount = new int[slen];
    frame = new int[slen];
    flying = new boolean[slen];
    dead = new boolean[slen];
    exploding = new boolean[slen];
    packX = new int[slen];
    packY = new int[slen];
    packdx = new int[packlen];
    packdy = new int[packlen];
    ----END OF CODE ----------------

    hi sorry if it's too big! i hope i can explain this very well (you know i only got this code in the net), if you try to run the program in emulator, the and lunch it will it will first display the title screen and if you hit the pressed key 5 it will display help,
    so my problem is how to move UP and DOWN and also if i pressed the fire button it will continue to fire. here is the code.
    //Code for the Left,Right,UP and Down movement and also the fire
    public void keyPressed(int i)
    int j = getGameAction(i);
    if(j == 2)
    MobileGalaga.playerLeft = true; //this is ok
    else
    if(j == 5)
    MobileGalaga.playerRight = true; //this is ok
    else
    if(j==1)
    MobileGalaga.playerUp = true; //i add this only, this has a problem
    else
    if(j==6)
    MobileGalaga.playerDown = true; //i add this only, this has a problem
    else
    if(j == 8)
    fireLaser(); //for the release of fire
    //for the release of key pressed
    public void keyReleased(int i)
    int j = getGameAction(i);
    if(j == 2)
    MobileGalaga.playerLeft = false;
    else
    if(j == 5)
    MobileGalaga.playerRight = false;
    //Update the position base on key pressed
    private void updatePos()
    if(playerLeft)
    updatePlayerPos(-5);
    else
    if(playerUp)
    updatePlayerPos1(-4);
    else
    if(playerDown)
    updatePlayerPos1(4);
    else
    if(playerRight)
    updatePlayerPos(5);
    fly = Math.abs(rand.nextInt() % difficulty);
    if(fly < slen && !flying[fly] && !dead[fly])
    if(x[fly] < CENTERW)
    setDX(fly, alien_dx_flyright, 2);
    setDY(fly, alien_dy_flyright, 2);
    } else
    setDX(fly, alien_dx_flyleft, 2);
    setDY(fly, alien_dy_flyleft, 2);
    flying[fly] = true;
    for(int i = 0; i < slen; i++)
    if(!dead)
    if(!flying[i])
    if(x[i] + edgeH + dx[i][dxcount[i]] > WIDTH)
    changePackDir(alien_dx_left, alien_dy_left);
    if((x[i] - edgeH) + dx[i][dxcount[i]] < 0)
    changePackDir(alien_dx_right, alien_dy_right);
    } else
    if(y[i] + edgeV + dy[i][dycount[i]] > HEIGHT)
    x[i] = packX[i];
    y[i] = packY[i];
    flying[i] = false;
    setDX(i, packdx, 0);
    setDY(i, packdy, 0);
    if(!playerdead && y[i] <= py + pedgeV && y[i] >= py - pedgeV && x[i] <= px + pedgeH && x[i] >= px - pedgeH)
    playerHit();
    if(laser && lasery <= y[i] + edgeV && lasery >= y[i] - edgeV && laserx <= x[i] + edgeH && laserx >= x[i] - edgeH)
    alienHit(i);
    for(int j = 0; j < slen; j++)
    if(!dead[j])
    if(framecount == 3)
    frame[j] = frame[j] + 1 < 2 ? 1 : 0;
    lastx = x[j];
    lasty = y[j];
    x[j] += dx[j][dxcount[j]];
    y[j] += dy[j][dycount[j]];
    if(pmode[j] == 0)
    dxcount[j] = dxcount[j] + 1 < dx[j].length ? dxcount[j] + 1 : 0;
    dycount[j] = dycount[j] + 1 < dy[j].length ? dycount[j] + 1 : 0;
    } else
    if(pmode[j] == 2)
    dxcount[j] = dxcount[j] + 1 < dx[j].length ? dxcount[j] + 1 : dxcount[j];
    dycount[j] = dycount[j] + 1 < dy[j].length ? dycount[j] + 1 : dycount[j];
    packX[j] += packdx[packcount];
    packY[j] += packdy[packcount];
    packcount = packcount + 1 < packlen ? packcount + 1 : 0;
    framecount = framecount + 1 < 4 ? framecount + 1 : 0;
    if(laser)
    lasery -= 6;
    if(lasery < 0 )
    laser = false;
    // this will move the object UP,DOWN,Left and Right
    private void updatePlayerPos(int i)
    plastx = px;
    px += i;
    if(px + pedgeH > WIDTH || px - pedgeH < 0)
    px = plastx;
    private void updatePlayerPos1(int i)
    plastx = py;
    py += i;
    if(px + pedgeV > HEIGHT || px - pedgeV < 0)
    px = plastx;
    // This will fire, if you hit the fire button
    private void fireLaser()
    if(!laser)
    laser = true;
    laserx = px;
    lasery = py;
    sorry if it's too long i just want too explain this. if anyone like to see this and run so that you can see it also, i can send an email.
    thanks,
    alek

  • Please people help me with this project ( the bag of fruits)

    hey everyone, i have a assignment that due next Monday and i have some troubles solving it its about a bag of fruits where we can put items grab items get items and so on. this site where the applet for this application is exist http://courses.cs.vt.edu/~csonline/SE/Lessons/OOP/index.html this is my code
    public class Bag{
    String fruits[];
    int bagSize;
    public Bag () //constructor
    String[] newFruits = new String[8];
    bagSize=0;
    private boolean isEmpty () {
    if (bagSize == 0) {
    return
    true;
    return false;
    private boolean isFull(){
    if ( bagSize== fruits.length-1){
    return true;
    return false;
    private int totalItems () {
    return bagSize;
    private boolean emptyBag (){
    return bagSize ==0 ;
    private boolean hasItem ( Object item ) {
    for ( int i =0 ; i<= bagSize-1 ; i++)
    if ( i == 0)
    return false;
    return true;
         public boolean putItem(String pItem){
         if(isFull() == true)
         return
         false;
         else
         fruits[bagSize] = pItem;
         return true;
    i will appreciate any help from you, thanks

    madridimoot wrote:
    my problem is that i have some missing methods like grabItem , putItem, getItem. and when i run the program it told me out of boundYes I can see from your code that you're having trouble with array indexes; if bagSize == 0 your bag is empty and where your bagSize == 8 (the size of the array) your bag is full. You have to add another fruit item at index position bagSize (and increment it afterwards). Deleting an element is a bit more trouble when you want to use an array. Also your method emptyBag() is redundant because it's functionally equivalent to the isEmpty() method. An array is quite a clumsy data structure for a bag of things. A List would've been better.
    kind regards,
    Jos

  • Can somebody help me with this Panic Report:

    Thu Mar 21 11:38:18 2013
    Panic(CPU 3): Unresponsive processor (this CPU did not acknowledge interrupts) TLB state:0x0
    RAX: 0x00000000ffffffff, RBX: 0x0000000000002710, RCX: 0x0000000000007000, RDX: 0xffffff80eb84d078
    RSP: 0xffffff80eb7dbc1c, RBP: 0xffffff80eb7dbc20, RSI: 0x0000000000007000, RDI: 0xffffff80d4ef6004
    R8:  0xffffff80eb7cd078, R9:  0x0000000000000000, R10: 0x0000000000000000, R11: 0x0000000000000040
    R12: 0x0000000000000000, R13: 0x0000000000000003, R14: 0x0000000000000066, R15: 0xffffff80d4ef6004
    RFL: 0x0000000000000292, RIP: 0xffffff7f83536e52, CS:  0x0000000000000008, SS:  0x0000000000000010
    Backtrace (CPU 3), Frame : Return Address
    0xffffff80eb85af50 : 0xffffff80026bd371
    0xffffff80eb85af80 : 0xffffff80026b7203
    0xffffff80eb85afd0 : 0xffffff80026ce6a8
    0xffffff80eb7dbc20 : 0xffffff7f835136c1
    0xffffff80eb7dbc80 : 0xffffff7f8355e8b9
    0xffffff80eb7dbcb0 : 0xffffff7f8355ea28
    0xffffff80eb7dbce0 : 0xffffff7f835604c6
    0xffffff80eb7dbda0 : 0xffffff7f8351089f
    0xffffff80eb7dbe20 : 0xffffff7f83502099
    0xffffff80eb7dbe60 : 0xffffff7f83539300
    0xffffff80eb7dbe80 : 0xffffff7f83504a9a
    0xffffff80eb7dbec0 : 0xffffff7f834b05c2
    0xffffff80eb7dbef0 : 0xffffff8002a472a8
    0xffffff80eb7dbf30 : 0xffffff8002a45daa
    0xffffff80eb7dbf80 : 0xffffff8002a45ed9
    0xffffff80eb7dbfb0 : 0xffffff80026b26b7
          Kernel Extensions in backtrace:
             com.apple.driver.AirPort.Atheros40(600.70.23)[2E6077DF-D532-357F-8107-F23BC2C10 F2F]@0xffffff7f834a2000->0xffffff7f835eafff
                dependency: com.apple.iokit.IOPCIFamily(2.7.2)[B1B77B26-7984-302F-BA8E-544DD3D75E73]@0xffff ff7f82c07000
                dependency: com.apple.iokit.IO80211Family(500.15)[4282DF5A-86B9-3213-B9B1-675FAD842A94]@0xf fffff7f83436000
                dependency: com.apple.iokit.IONetworkingFamily(3.0)[28575328-A798-34B3-BD84-D708138EBD17]@0 xffffff7f82ecc000
          Kernel Extensions in backtrace:
             com.apple.driver.AirPort.Atheros40(600.70.23)[2E6077DF-D532-357F-8107-F23BC2C10 F2F]@0xffffff7f834a2000->0xffffff7f835eafff
                dependency: com.apple.iokit.IOPCIFamily(2.7.2)[B1B77B26-7984-302F-BA8E-544DD3D75E73]@0xffff ff7f82c07000
                dependency: com.apple.iokit.IO80211Family(500.15)[4282DF5A-86B9-3213-B9B1-675FAD842A94]@0xf fffff7f83436000
                dependency: com.apple.iokit.IONetworkingFamily(3.0)[28575328-A798-34B3-BD84-D708138EBD17]@0 xffffff7f82ecc000
    BSD process name corresponding to current thread: kernel_task
    Mac OS version:
    12C60
    Kernel version:
    Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64
    Kernel UUID: 69A5853F-375A-3EF4-9247-478FD0247333
    Kernel slide:     0x0000000002400000
    Kernel t
    Model: iMac12,2, BootROM IM121.0047.B1F, 4 processors, Intel Core i5, 3.1 GHz, 8 GB, SMC 1.72f2
    Graphics: AMD Radeon HD 6970M, AMD Radeon HD 6970M, PCIe, 1024 MB
    Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1333 MHz, 0x80AD, 0x484D54333531533642465238432D48392020
    Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1333 MHz, 0x80AD, 0x484D54333531533642465238432D48392020
    AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x9A), Atheros 9380: 4.0.70.23-P2P
    Bluetooth: Version 4.0.9f33 10885, 2 service, 18 devices, 1 incoming serial ports
    Network Service: Wi-Fi, AirPort, en1
    Serial ATA Device: Hitachi HDS722020ALA330, 2 TB
    Serial ATA Device: OPTIARC DVD RW AD-5690H
    USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x850b, 0xfa200000 / 3
    USB Device: hub_device, 0x0424  (SMSC), 0x2514, 0xfa100000 / 2
    USB Device: Ext HDD 1021, 0x1058  (Western Digital Technologies, Inc.), 0x1021, 0xfa130000 / 5
    USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 4
    USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8215, 0xfa111000 / 6
    USB Device: hub_device, 0x0424  (SMSC), 0x2514, 0xfd100000 / 2
    USB Device: CTH-470, 0x056a  (WACOM Co., Ltd.), 0x00de, 0xfd140000 / 5
    USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd120000 / 4
    USB Device: Internal Memory Card Reader, apple_vendor_id, 0x8403, 0xfd110000 / 3
    It occurs up to twice a day!!!
    Thanks Consti

    Panic(CPU 0): Unresponsive processor (this CPU did not acknowledge interrupts) TLB state:0x0
    RAX: 0x00000000ffffffff, RBX: 0x0000000000002710, RCX: 0x0000000000007000, RDX: 0xffffff80eb715078
    RSP: 0xffffff80fa8fba2c, RBP: 0xffffff80fa8fba30, RSI: 0x0000000000007000, RDI: 0xffffff80daee1004
    R8:  0xffffff8008cbec60, R9:  0x00007fff8bcb9b00, R10: 0xffffff8008cbdc20, R11: 0x00007fff8bcb9b01
    R12: 0x0000000000000000, R13: 0x0000000000000003, R14: 0x0000000000000066, R15: 0xffffff80daee1004
    RFL: 0x0000000000000292, RIP: 0xffffff7f8958fe52, CS:  0x0000000000000008, SS:  0x0000000000000000
    Backtrace (CPU 0), Frame : Return Address
    0xffffff80eb714f50 : 0xffffff80086bd371
    0xffffff80eb714f80 : 0xffffff80086b7203
    0xffffff80eb714fd0 : 0xffffff80086ce6a8
    0xffffff80fa8fba30 : 0xffffff7f8956c6c1
    0xffffff80fa8fba90 : 0xffffff7f895b78b9
    0xffffff80fa8fbac0 : 0xffffff7f895b7a28
    0xffffff80fa8fbaf0 : 0xffffff7f895b94c6
    0xffffff80fa8fbbb0 : 0xffffff7f8956989f
    0xffffff80fa8fbc30 : 0xffffff7f8955ab61
    0xffffff80fa8fbcb0 : 0xffffff7f89535102
    0xffffff80fa8fbcf0 : 0xffffff7f89523056
    0xffffff80fa8fbd10 : 0xffffff7f89546f72
    0xffffff80fa8fbd80 : 0xffffff7f8954d3c4
    0xffffff80fa8fbdc0 : 0xffffff7f8954743c
    0xffffff80fa8fbe60 : 0xffffff7f8954ce66
    0xffffff80fa8fbea0 : 0xffffff7f895934b3
    0xffffff80fa8fbed0 : 0xffffff7f895da7ce
    0xffffff80fa8fbf20 : 0xffffff8008a49e4a
    0xffffff80fa8fbf60 : 0xffffff800863dcde
    0xffffff80fa8fbfb0 : 0xffffff80086b26b7
          Kernel Extensions in backtrace:
             com.apple.driver.AirPort.Atheros40(600.70.23)[2E6077DF-D532-357F-8107-F23BC2C10 F2F]@0xffffff7f894fb000->0xffffff7f89643fff
                dependency: com.apple.iokit.IOPCIFamily(2.7.2)[B1B77B26-7984-302F-BA8E-544DD3D75E73]@0xffff ff7f88c07000
                dependency: com.apple.iokit.IO80211Family(500.15)[4282DF5A-86B9-3213-B9B1-675FAD842A94]@0xf fffff7f8948f000
                dependency: com.apple.iokit.IONetworkingFamily(3.0)[28575328-A798-34B3-BD84-D708138EBD17]@0 xffffff7f88e3e000
          Kernel Extensions in backtrace:
             com.apple.driver.AirPort.Atheros40(600.70.23)[2E6077DF-D532-357F-8107-F23BC2C10 F2F]@0xffffff7f894fb000->0xffffff7f89643fff
                dependency: com.apple.iokit.IOPCIFamily(2.7.2)[B1B77B26-7984-302F-BA8E-544DD3D75E73]@0xffff ff7f88c07000
                dependency: com.apple.iokit.IO80211Family(500.15)[4282DF5A-86B9-3213-B9B1-675FAD842A94]@0xf fffff7f8948f000
                dependency: com.apple.iokit.IONetworkingFamily(3.0)[28575328-A798-34B3-BD84-D708138EBD17]@0 xffffff7f88e3e000
    BSD process name corresponding to current thread: kernel_task
    Mac OS version:
    12C60
    Kernel version:
    Darwin Kernel Version 12.2.0: Sat Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64
    Kernel UUID: 69A5853F-375A-3EF4-9247-478FD0247333
    Kernel slide:     0x0000000008400000
    Kernel text base: 0xffffff8008600000
    System model name: iMac12,2 (Mac-942B59F58194171B)
    System uptime in nanoseconds: 12068988959830
    last loaded kext at 10314800767704: com.apple.filesystems.smbfs          1.8 (addr 0xffffff7f8a98c000, size 229376)
    last unloaded kext at 10423125018987: com.apple.driver.AppleUSBCDC          4.1.22 (addr 0xffffff7f8a97b000, size 12288)
    loaded kexts:
    com.parallels.filesystems.prlufs          2010.12.28
    com.parallels.kext.prl_vnic          7.0 15107.796624
    com.parallels.kext.prl_netbridge          7.0 15107.796624
    com.parallels.kext.prl_hid_hook          7.0 15107.796624
    com.parallels.kext.prl_hypervisor          7.0 15107.796624
    com.parallels.kext.prl_usb_connect          7.0 15107.796624
    com.avatron.AVExFramebuffer          1.6.4
    com.avatron.AVExVideo          1.6.4
    com.rim.driver.BlackBerryUSBDriverInt          0.0.74
    com.apple.filesystems.smbfs          1.8
    com.apple.filesystems.msdosfs          1.8
    com.apple.driver.AppleBluetoothMultitouch          75.15
    com.apple.driver.AppleHWSensor          1.9.5d0
    com.apple.driver.IOBluetoothSCOAudioDriver          4.0.9f33
    com.apple.driver.IOBluetoothA2DPAudioDriver          4.0.9f33
    com.apple.iokit.IOBluetoothSerialManager          4.0.9f33
    com.apple.driver.AudioAUUC          1.60
    com.apple.driver.AGPM          100.12.69
    com.apple.driver.AppleMikeyHIDDriver          122
    com.apple.driver.AppleHDA          2.3.1f2
    com.apple.driver.AppleUpstreamUserClient          3.5.10
    com.apple.kext.AMDFramebuffer          8.0.0
    com.apple.driver.AppleMikeyDriver          2.3.1f2
    com.apple.iokit.BroadcomBluetoothHCIControllerUSBTransport          4.0.9f33
    com.apple.iokit.IOUserEthernet          1.0.0d1
    com.apple.AMDRadeonAccelerator          1.0.0
    com.apple.driver.AppleSMCLMU          2.0.2d0
    com.apple.driver.AppleLPC          1.6.0
    com.apple.Dont_Steal_Mac_OS_X          7.0.0
    com.apple.driver.ApplePolicyControl          3.2.11
    com.apple.driver.ACPI_SMC_PlatformPlugin          1.0.0
    com.apple.driver.AppleBacklight          170.2.3
    com.apple.driver.AppleMCCSControl          1.0.33
    com.apple.filesystems.autofs          3.0
    com.apple.driver.AppleSMCPDRC          1.0.0
    com.apple.driver.AppleIntelHD3000Graphics          8.0.0
    com.apple.driver.AppleIntelSNBGraphicsFB          8.0.0
    com.apple.driver.AppleIRController          320.15
    com.apple.iokit.SCSITaskUserClient          3.5.1
    com.apple.driver.AppleUSBCardReader          3.1.0
    com.apple.AppleFSCompression.AppleFSCompressionTypeDataless          1.0.0d1
    com.apple.AppleFSCompression.AppleFSCompressionTypeZlib          1.0.0d1
    com.apple.BootCache          34
    com.apple.driver.XsanFilter          404
    com.apple.iokit.IOAHCIBlockStorage          2.2.2
    com.apple.driver.AppleUSBHub          5.2.5
    com.apple.driver.AppleFWOHCI          4.9.6
    com.apple.iokit.AppleBCM5701Ethernet          3.2.5b3
    com.apple.driver.AirPort.Atheros40          600.70.23
    com.apple.driver.AppleAHCIPort          2.4.1
    com.apple.driver.AppleUSBEHCI          5.4.0
    com.apple.driver.AppleEFINVRAM          1.6.1
    com.apple.driver.AppleACPIButtons          1.6
    com.apple.driver.AppleRTC          1.5
    com.apple.driver.AppleHPET          1.7
    com.apple.driver.AppleSMBIOS          1.9
    com.apple.driver.AppleACPIEC          1.6
    com.apple.driver.AppleAPIC          1.6
    com.apple.driver.AppleIntelCPUPowerManagementClient          196.0.0
    com.apple.nke.applicationfirewall          4.0.39
    com.apple.security.quarantine          2
    com.apple.driver.AppleIntelCPUPowerManagement          196.0.0
    com.apple.driver.AppleMultitouchDriver          235.28
    com.apple.driver.AppleBluetoothHIDKeyboard          165.5
    com.apple.driver.IOBluetoothHIDDriver          4.0.9f33
    com.apple.driver.AppleHIDKeyboard          165.5
    com.apple.iokit.IOSerialFamily          10.0.6
    com.apple.driver.DspFuncLib          2.3.1f2
    com.apple.iokit.IOAudioFamily          1.8.9fc10
    com.apple.kext.OSvKernDSPLib          1.6
    com.apple.iokit.AppleBluetoothHCIControllerUSBTransport          4.0.9f33
    com.apple.iokit.IOSurface          86.0.3
    com.apple.driver.AppleThunderboltEDMSink          1.1.8
    com.apple.driver.AppleThunderboltEDMSource          1.1.8
    com.apple.iokit.IOAcceleratorFamily          19.0.26
    com.apple.iokit.IOFireWireIP          2.2.5
    com.apple.driver.AppleSMBusPCI          1.0.10d0
    com.apple.iokit.IOBluetoothFamily          4.0.9f33
    com.apple.driver.IOPlatformPluginLegacy          1.0.0
    com.apple.driver.AppleSMC          3.1.4d2
    com.apple.driver.AppleHDAController          2.3.1f2
    com.apple.iokit.IOHDAFamily          2.3.1f2
    com.apple.driver.AppleGraphicsControl          3.2.11
    com.apple.driver.AppleBacklightExpert          1.0.4
    com.apple.driver.AppleSMBusController          1.0.10d0
    com.apple.kext.triggers          1.0
    com.apple.driver.IOPlatformPluginFamily          5.2.0d16
    com.apple.kext.AMD6000Controller          8.0.0
    com.apple.kext.AMDSupport          8.0.0
    com.apple.iokit.IONDRVSupport          2.3.5
    com.apple.iokit.IOGraphicsFamily          2.3.5
    com.apple.driver.AppleThunderboltDPOutAdapter          1.8.5
    com.apple.driver.AppleThunderboltDPInAdapter          1.8.5
    com.apple.driver.AppleThunderboltDPAdapterFamily          1.8.5
    com.apple.driver.AppleThunderboltPCIDownAdapter          1.2.5
    com.apple.iokit.IOSCSIMultimediaCommandsDevice          3.5.1
    com.apple.iokit.IOBDStorageFamily          1.7
    com.apple.iokit.IODVDStorageFamily          1.7.1
    com.apple.iokit.IOCDStorageFamily          1.7.1
    com.apple.iokit.IOUSBHIDDriver          5.2.5
    com.apple.iokit.IOAHCISerialATAPI          2.5.0
    com.apple.driver.AppleUSBMergeNub          5.2.5
    com.apple.iokit.IOUSBUserClient          5.2.5
    com.apple.driver.AppleThunderboltNHI          1.6.0
    com.apple.iokit.IOThunderboltFamily          2.1.1
    com.apple.iokit.IOFireWireFamily          4.5.5
    com.apple.iokit.IOEthernetAVBController          1.0.2b1
    com.apple.iokit.IO80211Family          500.15
    com.apple.iokit.IONetworkingFamily          3.0
    com.apple.iokit.IOAHCIFamily          2.2.1
    com.apple.driver.AppleEFIRuntime          1.6.1
    com.apple.iokit.IOHIDFamily          1.8.0
    com.apple.iokit.IOSMBusFamily          1.1
    com.apple.security.sandbox          220
    com.apple.kext.AppleMatch          1.0.0d1
    com.apple.security.TMSafetyNet          7
    com.apple.driver.DiskImages          344
    com.apple.driver.AppleKeyStore          28.21
    com.apple.iokit.IOUSBMassStorageClass          3.5.0
    com.apple.driver.AppleUSBComposite          5.2.5
    com.apple.iokit.IOSCSIBlockCommandsDevice          3.5.1
    com.apple.iokit.IOStorageFamily          1.8
    com.apple.iokit.IOSCSIArchitectureModelFamily          3.5.1
    com.apple.iokit.IOUSBFamily          5.4.0
    com.apple.driver.AppleACPIPlatform          1.6
    com.apple.iokit.IOPCIFamily          2.7.2
    com.apple.iokit.IOACPIFamily          1.4
    com.apple.kec.corecrypto          1.0
    Panic(CPU 2): Unresponsive processor (this CPU did not acknowledge interrupts) TLB state:0x0
    RAX: 0xffffff801c4d2800, RBX: 0xffffff801c82c000, RCX: 0xffffff80fa985000, RDX: 0x000000007c34f001
    RSP: 0xffffff80fa6dbbf0, RBP: 0xffffff80fa6dbc00, RSI: 0xffffff801c4d2980, RDI: 0xffffff801c4d2980
    R8:  0x0000000000000000, R9:  0xffffff8104cf7000, R10: 0xffffff80fabb6000, R11: 0xffffff80fab86000
    R12: 0x0000000000001664, R13: 0xffffff801cc27ab0, R14: 0xffffff80fa6dbc18, R15: 0x0000000000006670
    RFL: 0x0000000000000202, RIP: 0xffffff7f8a0f552e, CS:  0x0000000000000008, SS:  0x0000000000000010
    Backtrace (CPU 2), Frame : Return Address
    0xffffff80f182cf50 : 0xffffff80086bd371
    0xffffff80f182cf80 : 0xffffff80086b7203
    0xffffff80f182cfd0 : 0xffffff80086ce6a8
    0xffffff80fa6dbc00 : 0xffffff7f8a0ba8f4
    0xffffff80fa6dbc20 : 0xffffff7f8a1d4320
    0xffffff80fa6dbc40 : 0xffffff7f893853e2
    0xffffff80fa6dbcc0 : 0xffffff7f8a1d49fc
    0xffffff80fa6dbd60 : 0xffffff7f8938e87f
    0xffffff80fa6dbdb0 : 0xffffff7f8938e6f4
    0xffffff80fa6dbdd0 : 0xffffff7f8938e45b
    0xffffff80fa6dbe50 : 0xffffff7f8938905a
    0xffffff80fa6dbef0 : 0xffffff7f89388cfa
    0xffffff80fa6dbf30 : 0xffffff8008a66e4e
    0xffffff80fa6dbf70 : 0xffffff80086a5b16
    0xffffff80fa6dbfb0 : 0xffffff80086ced53
          Kernel Extensions in backtrace:
             com.apple.iokit.IOHDAFamily(2.3.1f2)[9C95D2A5-6F93-3240-9512-C50D9D7FC51B]@0xff ffff7f8a0b7000->0xffffff7f8a0c2fff
             com.apple.iokit.IOAudioFamily(1.8.9f10)[0616A409-B8AF-34AC-A27A-F99939D8BD48]@0 xffffff7f8937d000->0xffffff7f893abfff
                dependency: com.apple.kext.OSvKernDSPLib(1.6)[E29D4200-5C5A-3A05-8A28-D3E26A985478]@0xfffff f7f89376000
             com.apple.driver.AppleHDA(2.3.1f2)[1EE24819-23E1-3856-B70C-DE8769D2B3F6]@0xffff ff7f8a1c2000->0xffffff7f8a23cfff
                dependency: com.apple.driver.AppleHDAController(2.3.1f2)[C2BAE0DE-652D-31B4-8736-02F1593D23 46]@0xffffff7f8a0ed000
                dependency: com.apple.iokit.IONDRVSupport(2.3.5)[86DDB71C-A73A-3EBE-AC44-0BC9A38B9A44]@0xff ffff7f891d8000
                dependency: com.apple.iokit.IOAudioFamily(1.8.9fc10)[0616A409-B8AF-34AC-A27A-F99939D8BD48]@ 0xffffff7f8937d000
                dependency: com.apple.iokit.IOHDAFamily(2.3.1f2)[9C95D2A5-6F93-3240-9512-C50D9D7FC51B]@0xff ffff7f8a0b7000
                dependency: com.apple.iokit.IOGraphicsFamily(2.3.5)[803496D0-ADAD-3ADB-B071-8A0A197DA53D]@0 xffffff7f89195000
                dependency: com.apple.driver.DspFuncLib(2.3.1f2)[462137E5-EB47-3101-8FA8-F3AC82F2521B]@0xff ffff7f8a103000
          Kernel Extensions in backtrace:
             com.apple.driver.AppleHDAController(2.3.1f2)[C2BAE0DE-652D-31B
    Model: iMac12,2, BootROM IM121.0047.B1F, 4 processors, Intel Core i5, 3.1 GHz, 8 GB, SMC 1.72f2
    Graphics: AMD Radeon HD 6970M, AMD Radeon HD 6970M, PCIe, 1024 MB
    Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1333 MHz, 0x80AD, 0x484D54333531533642465238432D48392020
    Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1333 MHz, 0x80AD, 0x484D54333531533642465238432D48392020
    AirPort: spairport_wireless_card_type_airport_extreme (0x168C, 0x9A), Atheros 9380: 4.0.70.23-P2P
    Bluetooth: Version 4.0.9f33 10885, 2 service, 18 devices, 1 incoming serial ports
    Network Service: Wi-Fi, AirPort, en1
    Serial ATA Device: Hitachi HDS722020ALA330, 2 TB
    Serial ATA Device: OPTIARC DVD RW AD-5690H
    USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x850b, 0xfa200000 / 3
    USB Device: hub_device, 0x0424  (SMSC), 0x2514, 0xfa100000 / 2
    USB Device: BRCM2046 Hub, 0x0a5c  (Broadcom Corp.), 0x4500, 0xfa110000 / 4
    USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x8215, 0xfa111000 / 5
    USB Device: hub_device, 0x0424  (SMSC), 0x2514, 0xfd100000 / 2
    USB Device: Flash Disk, 0x1221, 0x3234, 0xfd140000 / 5
    USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd120000 / 4
    USB Device: Internal Memory Card Reader, apple_vendor_id, 0x8403, 0xfd110000 / 3
    I also often have this Panic report.
    I think it includes the Software  part. My other Panic report had no software report!#
    Thank you all for helping!
    It is from January 2013.
    Consti

  • Please anyone help me with this

    Hi guys, Check this out:
    http://www.large-online.nl/partnerimg/4/436794.jpg
    How do you remove the letter in photoshop cs5? I wanted it removed while maintaining the hair.
    please explain me step by step. thank you!

    Yes it is not my image, you are right, I am sorry...
    I've decided not to continue this idea. So, case closed.
    Thank you to all of you, take care and best wishes
    cheers
    me

  • I'm trying to install Creative Cloud and I keep getting a 'CREATIVE COUD DESKTOP FAILED ERROR1" can somebody help me with this....

    I keep getting an error1 descktop failure while installing cc desktop????

    http://myleniumerrors.com/installation-and-licensing-problems/creative-cloud-error-codes-w ip/
    http://helpx.adobe.com/creative-cloud/kb/failed-install-creative-cloud-desktop.html
    or
    A chat session where an agent may remotely look inside your computer may help
    Creative Cloud chat support (all Creative Cloud customer service issues)
    http://helpx.adobe.com/x-productkb/global/service-ccm.html

  • Somebody help me with this gridbaglayout code....

    guys
    do take a look at this problem....this code on being compile and executed doesn't give any error nor does it give any exception...no response at all.
    import javax.swing.*;
    import java.awt.*;
    import javax.swing.event.*;
    import java.awt.event.*;
    import java.util.*;
    public class Applicant extends JFrame
         JPanel panel;
         JLabel lapid;
         JLabel lapaddress;
         JLabel lapposition;
         JLabel lapname;
         JButton submit;
         JButton reset;
         JTextField tapid;
         JTextField tapaddress;
         JTextField tapname;
         JComboBox cbapposition;
         GridBagLayout g;
         GridBagConstraints gbc;
         public Applicant()
              super("application");
              create();
         public void create()
              Container c=getContentPane();
              g=new GridBagLayout();
              gbc=new GridBagConstraints();
              panel=new JPanel();//(JPanel)getContentPane();
              panel.setLayout(g);
              lapid=new JLabel("applicant id");
              gbc.fill=GridBagConstraints.BOTH;
              gbc.ipady=2;
              gbc.ipadx=2;
              gbc.gridx=0;
              gbc.gridy=1;
              g.setConstraints(lapid,gbc);
              panel.add(lapid);
              tapid=new JTextField();
              gbc.ipady=2;
              gbc.ipadx=2;
              gbc.gridx=1;
              gbc.gridy=1;
              g.setConstraints(tapid,gbc);
              panel.add(tapid);
              lapname=new JLabel("applicant name");
              gbc.ipady=2;
              gbc.ipadx=2;
              gbc.gridx=0;
              gbc.gridy=2;
              g.setConstraints(lapname,gbc);
              panel.add(lapname);
              tapname=new JTextField();
              gbc.ipady=2;
              gbc.ipadx=2;
              gbc.gridx=1;
              gbc.gridy=2;
              g.setConstraints(tapname,gbc);
              panel.add(tapname);
              lapaddress=new JLabel ("applicant address");
              gbc.ipady=2;
              gbc.ipadx=2;
              gbc.gridx=0;
              gbc.gridy=3;
              g.setConstraints(lapaddress,gbc);     
              panel.add(lapaddress);
              tapaddress= new JTextField();
              gbc.ipady=2;
              gbc.ipadx=2;
              gbc.gridx=1;
              gbc.gridy=3;
              g.setConstraints(tapaddress,gbc);
              panel.add(tapaddress);
              lapposition=new JLabel("applicant position");
              gbc.ipady=2;
              gbc.ipadx=2;
              gbc.gridx=0;
              gbc.gridy=4;
              g.setConstraints(lapposition,gbc);
              panel.add(lapposition);
              cbapposition=new JComboBox();
              cbapposition.addItem("executive");
              cbapposition.addItem("manager");
              gbc.fill=GridBagConstraints.BOTH;
              gbc.insets=new Insets(10,0,0,30);
              gbc.ipady=2;
              gbc.ipadx=2;
              gbc.gridx=1;
              gbc.gridy=4;
              g.setConstraints(cbapposition,gbc);
              panel.add(cbapposition);
              JButton submit=new JButton("submit");
              gbc.ipady=2;
              gbc.ipadx=2;
              gbc.gridx=0;
              gbc.gridy=5;
              g.setConstraints(submit,gbc);
              panel.add(submit);
              JButton reset=new JButton("reset");
              gbc.ipady=2;
              gbc.ipadx=2;
              gbc.gridx=1;
              gbc.gridy=5;
              g.setConstraints(reset,gbc);
              panel.add(reset);
              c.add(panel,BorderLayout.CENTER);
              c.setSize(500,400);
              c.setVisible(true);
         public static void main(String[] args)
              System.out.println("hi");
              Applicant a=new Applicant();
              System.out.println("there");
              try
                   UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
              catch(Exception e)
              System.out.println("hello");
              

    Ok, you know how to use the "bold" tags which do absolutely nothing to make the question clearer. Now learn how to use the "code" tags which will keep the codes original formatting and make the code easier to read, which in turn will make it easier for people to understand you code and provide some advice.

  • Hi I have downloaded the photoshop CC and app is nowhere on my computer dan somebody help me with this?

    Photoshop General DiscussionPhotoshop General Discussion

    Might be good if you'd describe what kind of computer, and a bit more about just what you did. 
    "I have downloaded the photoshop CC" isn't really very descriptive.  Did you run the Creative Cloud application?  Did it spend time installing Photoshop (i.e., did you see the little progress bar go across)?
    It may be that it's there and you just don't know how to start it, or you didn't install anything yet.  It's hard to know without more info.
    -Noel

  • I recently upgraded to IOS 10.9.5 and now I can't export anything from final cut Pro X. Could somebody please help me with this?

    I recently upgraded to IOS 10.9.5 and now I can't export anything from final cut Pro X. Could somebody please help me with this?

    SSign in to the App Store using the Apple ID that was used to purchase the software.

Maybe you are looking for

  • How do you switch iCloud apple id on iPad

    I am trying to help someone who originally set up their ipad3 with one apple Id for iCloud, but now wants to change it to another apple Id. How do I do this? When I go into settings, under iCloud, I can see the apple I'd, but it will not let click on

  • Projects "Shared to Media Browser" don't actually appear in Media Browser

    Hello all. I've got one of those "it seems so easy I must be doing something wrong" questions. (I accidentally posted this in the iMovie HD forum by accident, the first time. I'm actually using iMovie '08.) This is the first time I've tried this, and

  • Is it possible I found a bug in Java Pattern (JDK 1.5)???

    It is hard to believe that I should have found an error in the java.util.regex.Pattern class - and I hope you can tell me I'm wrong. Look at this example: Let's say the pattern is "%\d+". I can then easily match against, let's say "%20". If I however

  • IPhoto can not run due to an incompatible version of ProKit on 10.8

    iPhoto can not run due to an incompatible version of ProKit on Mountian Lion 10.8

  • PDF writer losing files

    In Acrobat Pro 8 with Vista I can't print from the web as a pdf.   I click print and select PDF Writer (as normal) I then have option to name the file, and browse to where I want it to go. I do that and  then click Print ... and a pop up window then