Java Menu setout problems.

Dear Everyone,
I am currently experiencing some problems with organising a User Interface that uses menu items. This code creates a File menu and a New menu that sit side by side (with New to the right of File). I am trying to design a menu that has only File visible, with New showing below File only when File is pressed. Can anybody please suggest modifications that will make this possible. Thanks.
Regards
D
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
class GUI extends JFrame
GUI()
Toolkit tk = Toolkit.getDefaultToolkit(); //intialize the toolkit.
Dimension sSize = tk.getScreenSize(); //determine screen size.
Container c = getContentPane();
c.setLayout(new FlowLayout());
JMenuBar menuBar = new JMenuBar(); //Creates Menubar object called menuBar.
setJMenuBar(menuBar);
JMenu FMenu = new JMenu("File"); //File Menu object instantiated.
FMenu.setMnemonic(KeyEvent.VK_F); //Key that activates File menu...F.
menuBar.add(FMenu); //File Menu added to menuBar object.
JMenuItem NewItem = new JMenuItem("New"); //Creates New sub-menu object.
NewItem.setMnemonic(KeyEvent.VK_N); //Key that activates New sub-
//menu....N.
menuBar.add(NewItem);
setLocation(sSize.width/4,sSize.height/4);
setSize(sSize.width/2,sSize.height/4);
setTitle("Java QuickLaunch Toolbar");
setVisible(true);
}

Change
menuBar.add(NewItem);to:
FMenu.add(NewItem);You need to add to the menu, not to the menubar, that's why it wasn't appearing in the correct place.

Similar Messages

  • Java menu problem

    Hi,
    I have a java menu that pops up to the side on mouse over, however when the browser window is fully expanded on screen the submenu positions its self over the top of the main menu, not on the side.
    How can this be corrected?
    Image example: http://i67.photobucket.com/albums/h283/jborrach/menu.jpg

    I did solved the problem with help of my colleague....
    Thanks to who all replied to this thread .It took some delay to post my solution.May be some other developer can find this thread helpful in future i hope...
    Here is the solution code....
    package jlistproject;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Main {
        private static JPopupMenu popUp;
        public static void main(String[] args)
           JFrame frame = new JFrame("This is the Frame Window");
           frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
           frame.setLayout(new GridLayout());
           frame.setSize(500,500);
           String subject[] = {"Item1", "Item2", "Item3", "Item4","Item5","Item6"};
           final JList list = new JList(subject);
           popUp = new JPopupMenu();
           popUp.add("click 1");
           popUp.add("click 2");
           popUp.add("click 3");
           list.addMouseListener(new MouseAdapter() {
                       public void mouseClicked(MouseEvent e)
                  if (e.getButton() == e.BUTTON3)
                     JList  c =  (JList) e.getComponent();
                     int x = e.getX();
                     int y = e.getY();
                    if(!list.isSelectionEmpty()&& list.locationToIndex(e.getPoint()) == list.getSelectedIndex())
                         int count = c.getModel().getSize();
                         int cal = count * 18;
                         if(y <= cal)
                             popUp.show(list, x, y);                        
           frame.add(new JScrollPane(list));
           frame.setVisible(true);
    }Regards.
    IdealKoder

  • Java Menu Troubles...

    Hello,
    When I click the main menu graphics on the web site I've been working on, the reloading of the java menu is causing a very noticeable flash to occur between pages.
    The web site is hosted at:
    http://liverdance.sheepless.net/work/index.shtml
    Any suggestions are how to eliminate the flash between pages???
    Is there a way to modify the java script so as to eliminate this problem while still prompting the new page (corresponding to the main menu graphic) to load?
    SIL

    Hi,
    try to use doble-buffering: create an offline-image in memory, call getGraphics on this image, make your output operations on this graphic context and draw the offline image to the graphic context received as parameter of the paint-method.
    void paint(Graphics g){
       Image bufferImage = createImage(width, height);
       Graphics buffer = bufferImage.getGraphics();
       //perform your drawing operations here
       g.drawImage(bufferImage, 0, 0, null);
    }Regards,
    Dimitri

  • Sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loop

    sir i have given lot of effort but i am not able to solve my problem either with notifiers or with occurence fn,probably i do not know how to use these synchronisation tools.

    sir i am using datasocket read ,i am communicating with java but my problem is that bcz im using while loop to see if value has changed my labview consumes all the processors time ,sir i want a event like thing so that while loop is not in continuous loopHi Sam,
    I want to pass along a couple of tips that will get you more and better response on this list.
    1) There is an un-written rule that says more "stars" is better than just one star. Giving a one star rating will probably eliminate that responder from individuals that are willing to anser your question.
    2) If someone gives you an answer that meets your needs, reply to that answer and say that it worked.
    3) If someone suggests that you look at an example, DO IT! LV comes with a wonderful set of examples that demonstate almost all of the core functionality of LV. Familiarity with all of the LV examples will get you through about 80% of the Certified LabVIEW Developer exam.
    4) If you have a question first search the examples for something tha
    t may help you. If you can not find an example that is exactly what you want, find one that is close and post a question along the lines of "I want to do something similar to example X, how can I modify it to do Y".
    5) Some of the greatest LabVIEW minds offer there services and advice for free on this exchange. If you treat them good, they can get you through almost every challenge that can be encountered in LV.
    6) If English is not your native language, post your question in the language you favor. There is probably someone around that can help. "We're big, we're bad, we're international!"
    Trying to help,
    Welcome to the forum!
    Ben
    Ben Rayner
    I am currently active on.. MainStream Preppers
    Rayner's Ridge is under construction

  • How do I display or hide a Java menu based on current url in a php page

    How do I display or hide a Javascript menu based on the current url in a php page?
    I want to specify when a java menu appears on a page based on the current url - does anyone have a script for the vars and conditional statements to make this happen - it would be something like this in natural language:
    <javascript>
    if currenturl = http://jemmakidd.com/categories.php
    then displaymenu
    else if currenturl = http://jemmakidd.com/categories.php?cat=14 (or 15,16 etc)
    then DONOTdisplaymenu
    What is needed is that, if you look at this page there is a java menu under the first category:
    http://jemmakidd.com/categories.php
    I WANT the menu to appear on that page so that is working, however if I look at one of the store categories, like on this page, I do NOT want the menu to appear - it may be that this can be done without using a java current url type function - thats why I'm asking...
    http://jemmakidd.com/categories.php?cat=14
    So to summarise:
    http://jemmakidd.com/categories.php (If this url is used DO display menu - if any other url DONT display menu)
    Thanks again...any ideas?
    Edited by: littlealex2009 on Jul 15, 2009 12:51 AM

    This is a Java forum, not a Javascript forum. Google the differences.
    kind regards,
    Jos

  • Re   Java Stored Procedure Problem

    Ben
    There appear to be some problem with the forum. It doesn't want to show my response to your post with the subject "Java Stored Procedure Problem". See the answer to this thread for an example of how to do this...
    Is there a SAX parser with PL/SQL??

    Ben
    There appear to be some problem with the forum. It doesn't want to show my response to your post with the subject "Java Stored Procedure Problem". See the answer to this thread for an example of how to do this...
    Is there a SAX parser with PL/SQL??

  • "How to Resolve ORA-29532 Java 2 Permission Problems in RDBMS 8.1.6 and 8.1.7"

    I'm in the process of publishing the following note (134280.1), titled "How to Resolve ORA-29532 Java 2
    Permission Problems in RDBMS 8.1.6 and 8.1.7".
    It will be accessible from Oracle Support's "Metalink" site.
    "How to Resolve ORA-29532 Java 2 Permission Problems in RDBMS 8.1.6 and 8.1.7".
    Problem Description
    Periodically an application running in the Enterprise Java Engine
    (EJE) formerly known as the "Oracle 8i JVM", "the JSERVER component", or
    the "Aurora JVM" will fail with a "java 2" permissions error having the
    following format :
    Note : Message shown below have been reformatted for easier readability.
    java.sql.SQLException: ORA-29532: Java call terminated by uncaught Java exception:
    usually followed by a detailed error message similar to one of the following
    messages :
    Example # 1
    java.security.AccessControlException: the Permission
    (java.net.SocketPermission hostname resolve)
    has not been granted by dbms_java.grant_permission to
    SchemaProtectionDomain(SCOTT|PolicyTableProxy(SCOTT))
    Example # 2
    java.security.AccessControlException: the Permission
    (java.util.PropertyPermission * read,write)
    has not been granted by dbms_java.grant_permission to
    SchemaProtectionDomain(SCOTT|PolicyTableProxy(SCOTT))
    Example # 3
    java.security.AccessControlException: the Permission
    (java.io.FilePermission \matt1.gif read)
    has not been granted by dbms_java.grant_permission to
    SchemaProtectionDomain(SCOTT|PolicyTableProxy(SCOTT))
    Explanation
    The java 2 permission stated in line # 2 of each of the above "Examples"
    has not been granted to the user specified in line 4 of the above "Examples".
    Solution Description
    The methodology to solve this issue is identical for all java 2 permissions
    cases.
    1) Format a call "dbms_java.grant_permission" procedure as described below.
    2) Logon as SYS or SYSTEM
    3) Issue the TWO commands shown below
    4) Logoff as SYS or SYSTEM
    5) Retry your application
    For Example # 1
    1) Logon as SYS or SYSTEM
    2) Issue the following commands :
    a) call dbms_java.grant_permission('SCOTT',
    'java.net.SocketPermission',
    'hostname',
    'resolve');
    b) commit;
    Note: Commit is mandatory !!
    3) Logoff as SYS or SYSTEM
    4) Retry your application
    For Example # 2
    1) Logon as SYS or SYSTEM
    2) Issue the following commands :
    a) call dbms_java.grant_permission('SCOTT',
    'java.util.PropertyPermission',
    'read,write');
    b) commit;
    Note: Commit is mandatory !!
    3) Logoff as SYS or SYSTEM
    4) Retry your application
    For Example # 3
    1) Logon as SYS or SYSTEM
    2) Issue the following commands :
    a) call dbms_java.grant_permission('SCOTT',
    'java.io.FilePermission',
    '\matt1.gif',
    'read');
    b) commit;
    Note: Commit is mandatory !!
    3) Logoff as SYS or SYSTEM
    4) Retry your application
    References
    For more details on java 2 permissions and security within the EJE, review
    Chapter 5, in the Java Developer's Guide. entitled,
    "Security For Oracle8i Java Applications"
    The RDBMS 8.1.7 version can be found at :
    http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/java.817/index.htm

    Hi, Don,
    I solved the problem of security exception I mentioned at java procedure topic as following:
    ORA-29532: Java call terminated by uncaught Java exception: java.lang.SecurityException
    I tried to use your solution as following:
    call dbms_java.grant_permission('SDE', 'java.net.SocketPermission', 'ORCL.COHPA.UCF.EDU','resolve');
    but SQL*plus gave me a error message:
    invalid collumn.
    What's the problem?
    However, I call a grant command as following:
    SQL> grant JAVASYSPRIV to sde;
    and then that exception is gone. What's the difference between dbms_java.grant_permission and grant command?
    Thanks
    Bing
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by don -- oracle support:
    I'm in the process of publishing the following note (134280.1), titled "How to Resolve ORA-29532 Java 2
    Permission Problems in RDBMS 8.1.6 and 8.1.7".
    It will be accessible from Oracle Support's "Metalink" site.
    "How to Resolve ORA-29532 Java 2 Permission Problems in RDBMS 8.1.6 and 8.1.7".
    Problem Description
    <HR></BLOCKQUOTE>
    null

  • Horizontal java menu systems

    Does anyone have a pure java menu system for my servlet ?
    I can't have any dhtml/javascript yet I need some dynamic stuff like when u click on an item and if it has subitems it will merely drop down a list with these items.
    If u could help me or even direct/guide me in the correct direction I would be extremely happy !

    try out these examples they may help you in some way.
    http://www2.gol.com/users/tame/swing/examples/SwingExamples.html

  • Java Front-end problems with Windows 200 Pro

    Hi,
    I have some problem on my pc with java applications front-end. I have windows 2000 Professional and use java(TM) 2 SDK, Standard Edition Version 1.3.1
    Using every java applications (also development environment as JBuilder 4 Professional and Together 4) I have always problems with front-end: the text is bad visualized everytime I use the scroolbar, menu items into a menu are bad visualized while I drag over of them the mouse and so on...
    To try to solve this my problem I have just installed Service Pack 2 for Windows 2000 Pro but I have not had good results - I keep to have the usual problem.
    I'm aware that it is difficult to reproduce and however if anyone has some idea to solve my problem I am opened to every suggestion.
    Thanks in advance

    the text says that what technolody that they are using its called "Off Screen Images" once i used them in my applications to improve the prefomance.
    What they says is to improve the time it takes to display componants that display text on them (Such as buttons, Labels...) they going to create an Off Screen Image of the text and then paste that image on to the screen whenever the componant has to be displayed/Re displayed instead of redrowing (Re rendering) the text on the screen repeatedly which take more time and processing power than rendering once and paste it to screen whenever needed but this solution will take some more memory.

  • Sun Java Communications Sync Problem

    hello,
    I have windows VISTA and i installed "Sun Java Communications Sync" on it.
    When i click in Outlook the "synchronize" tab then "Configure menu" to configure my calendar an Address Bokk settings, it gives me the error "Unable to login to synch engine".
    If i open the program after installation from the program menu, it gives me "Invalid user name" error.
    Any ideas?
    Thanks,
    stamford

    lock123 wrote:
    1) Contacts with birthday less then 1970 are stored in calendar server with birthday 1970 after synchronization from device.You cannot store contacts in the calendar server. The calendar server only stores events and tasks. Contacts are stored in the LDAP directory server.
    Is there any workaround to resolve the problem? If you meant to say that events with a start-date of less then 1970 don't get synchronised, then no, there is no workaround. This is a fundamental limitation of Unix timestamps as used by the calendar server to represents event dates.
    2)
    To clarify, the problem with Cyrillic characters becoming corrupted occurs when you sync contacts which exists only on the windows mobile device to the server-side addressbook? --- Yes it is
    Does this corruption occur if you synchronise a contact created on the server to the windows mobile client? ---- only birthday is wrong on pocket after syncThe birthday being incorrect is likely to be a different issues.
    A quick search didn't reveal any existing reports of the behaviour you are seeing and I have no way to reproduce the problem myself to investigate further so I suggest once again logging a Sun support case for these two issues (birthday & Cyrillic character corruption).
    Regards,
    Shane.

  • Java & Windows XP Problems

    I really hope someone can help me with this, because it become soooooo frustrating!
    I originally ran Java 2 1.2.2 on a 733mhz P3 64Mb RAM PC Win 98, using Textpad 3 with no problems at all.
    I've now upgraded to a 1.8Ghz Duron, 128Mb RAM, Win XP. I downloaded and installed Textpad 4.6 first and then installed Java SDK1.4.1 & JRE.
    The first time I installed it, and tried to compile a very simple "Hello World" progam using the "Compile Java" command from the tools menu, the javac command would crash, and therefore not run. The resultant message would simply say "exited with code XXXXXXXXXXX". (Sorry, can't remember what the code was!)
    Strangely, I tried again recently to install it, and this time it seemed to install successfully because it will compile but it would come up with a Java Hotspot Virtual Machine Error. I have no idea what this means! Why is it saying this?
    I've searched the bug database and followed the installation instructions, and haven't been able to make much sense of the error.
    Has anyone else experienced this problem? Is Java 2 1.4.1 actually compatible with XP?

    http://forum.java.sun.com/thread.jsp?forum=54&thread=305813
    This is about the most active recurring thread about XP and 1.4 compatibility problems. I don't have any problem with XP (prof), 1.4 and TextPad. I run a Sony VIAO laptop that doesn't have an ATI video card.
    Dumb question, but you did set your TextPad preferences to include the compile and run options? I guess you wouldn't see them in the tools drop-down if you hadn't. Sorry, had to ask.
    My options on compile are = parameters: $File, initial folder: $FileDir
    on run application = parameters: $BaseName initial folder: $FileDir
    on run applet = same as application
    Can't remember if those are the defaults, but I expect they are.
    make sure your path is OK. I don't remember doing anything special or heroic to make TP work on my XP machine...
    TextPad is very much my favorite stand-alone text editor, but I totally agree that when you are ready for an IDE (do it!) eclipse is great. It's open source, free, and you have hundreds of choices for plugin options. The nice part with eclipse is you can have your text editor, hex editor, XML tool, Python, Java, C++, etc. all open in the same tool at the same time.
    Luck

  • Java Project-----Code Problems

    hiya......having problems...finishing off this project....liberary account......full of classes and super's.....a few methods giving me problems (Borrow , REturn)....not sure what to do....and then a big main to run it all from and call everything....aaahhhh hheeellpp
    class Owner
         public String name;
         public String Address;
         public String town;
         public Owner next;
         public String Owner(String nam, String add, String t)
              name=nam;
              address=add;
              town=t;
         public Owner(Owner o)
              name = o.name;
              street = o.street;
              town = o.town;
         public void printOwnerDetails()
              System.out.println("Name : "+name);
              System.out.println("Address : "+address);
              System.out.println("Town : "+town);
    class OwnerLinkedList
         private Owner head;
         public OwnerLinkedList() { head = null; }
         public void insert(Owner o)
              Owner temp = new Owner(o);
              temp.next = head;
              head = temp;
         public String delete_first()
              if(head == null)
                   return null;
              String result = head.readName();
              head = head.next;
              return result;
         public String delete_last()
              if(head == null)
                   return null;
              if(head.next == null)
                   String result = head.readName();
                   head = null;
                   return result;
              Owner temp = head;
              while(temp.next.next != null)
                   temp = temp.next;
              String result = temp.next.readName();
              temp.next = null;
              return result;
         public void printList()
              Owner temp = head;
              while(temp != null)
                   temp.printOwnerDetails();
                   System.out.println();
                   temp = temp.next;
         public boolean searchList(String s)
              Owner temp = head;
              while(temp != null)
                   if(temp.name.equals(s))
                        return true;     
              else
                   temp = temp.next;
              return false;
    class Account
         public int numonloan;
         public int id_num;
    public Owner memberdetails;
         public int numweeks;
    public Account next;
         public Account(int loan, int i, Owner o, int week)
              int numonloan=0;
              int id_num=i;
              Owner memberdetails= o;
              int numweeks=0;
         public check_OnLoan( int numonloan, int id_num, owner memberdetails, int numweeks)
              numonloan=0;
              id_num=a.id_num;
              memberdetails=0;
              numweeks=0;
         public     return(){};
         public borrow(){};
         public void printAccountDetails()
              memberDetials.printOwnerDetails();
              System.out.println("id No : "+idno);
              numOfWeeks = 0;
              numOnLoan = 0;
    class AccountLinkedList
         private Account head;
         public LinkedList() { head = null; }
         public void insert(String s)
              Account temp = new Account(s);
              temp.next = head;
              head = temp;
         public String delete_first()
              if(head == null)
                   return null;
              String result = head.readName();
              head = head.next;
              return result;
         public String delete_last()
              if(head == null)
                   return null;
              if(head.next == null)
                   String result = head.readName();
                   head = null;
                   return result;
              Account temp = head;
              while(temp.next.next != null)
                   temp = temp.next;
              String result = temp.next.readName();
              temp.next = null;
              return result;
         public void printList()
              Account temp = head;
              while(temp != null)
                   System.out.println("Name: " +temp.readName());
                   temp = temp.next;
              System.out.println();
         public boolean searchList(String s)
              Account temp = head;
              while(temp != null)
                   if(temp.name.equals(s))
                        return true;     
              else
                   temp = temp.next;
              return false;
    class Lecturer extends Account
         private maxNumOnLoan;
         public Lectuer(int idno,Owner o1,int maxNumOnLoan)
              super.(idno,01);
              maxNumOnLoan=maxNumOnLoan;
         public borrow()
              if numweeks > 12
                   if numOnLoan ==14
                   System.out.println("You Cannot Get Out Another Book, Check Account Details");
         public printDetails(){super.()}
    public static void LectureAccount (OwnerLinkList ownerlist, LectureLinkList lecturelist)
         bufferedReader in = new BufferedReader (new InputStreamReader (System.in));
              String line =" ";
              String name =" ";
              String street =" ";
              String town =" ";
              int id= 0;
              int maxNumOnLoan=12;
         try{
         System.out.println("Enter Owner Name : ");
         name = in.readLine();
         System.out.println(" Enter Owner Street : ");
         street = in.readLine();
         System.out.println(" Enter Owner town : ");
         town = in.readline();
         System.out.println(" Enter id No: ");
         line = in.readLine();
         id = Integer.valueOf(line).intValue();
         catch(Exception e) {}
         Owner 01 = new Owner (name, street, town);
         ownerlist.insert(a1);
         System.out.print(" Owner "+name+ " inserted into Owner List");
         Lecture l1 = new Lecture(id,o1, maxNumOnLoan);
         Lecturelist.Insert (l1);
         System.out.print ("Lecture Information Stored In Lecture List);
    class LecturerLinkedList
         private Lecture head;
         public LinkedList() { head = null; }
         public void insert(String s)
              Lecture temp = new Account(s);
              temp.next = head;
              head = temp;
         public String delete_first()
              if(head == null)
                   return null;
              String result = head.readName();
              head = head.next;
              return result;
         public String delete_last()
              if(head == null)
                   return null;
              if(head.next == null)
                   String result = head.readName();
                   head = null;
                   return result;
              Node temp = head;
              while(temp.next.next != null)
                   temp = temp.next;
              String result = temp.next.readName();
              temp.next = null;
              return result;
         public void printList()
              Node temp = head;
              while(temp != null)
                   System.out.println("Name: " +temp.readName());
                   temp = temp.next;
              System.out.println();
         public boolean searchList(String s)
              Account temp = head;
              while(temp != null)
                   if(temp.name.equals(s))
                        return true;     
              else
                   temp = temp.next;
              return false;
    class Student extends Account
         private minNumWeeks;
         public Student(int idno,int minweek,Owner 01)
              o=own;
              super.(idno,01);
              minNumWeeks=minNumWeeks;
         public return(){}
         public printDetails(){super.()}
    public static void StudentAccount (OwnerLinkList OwnerList, StudentLinkList studentlist)
         bufferedReader in = new BufferedReader (new InputStreamReader (System.in));
              String line =" ";
              String name =" ";
              String street =" ";
              String town =" ";
              int id= 0;
              int minNumWeeks=4;
         try{
         System.out.println("Enter Owner Name : ");
         name = in.readLine();
         System.out.println(" Enter Owner Street : ");
         street = in.readLine();
         System.out.println(" Enter owner town : ");
         town = in.readline();
         System.out.println(" Enter id No: ");
         line = in.readLine();
         id = Integer.valueOf(line).intValue();
         catch(Exception e) {}
         Owner 01 = new Owner (name, street, town);
         ownerlist.insert(a1);
         System.out.print(" Owner "+name+ " inserted into Owner List");
         Student s1 = new Student(id,o1,minNumWeeks);
         Studentlist.Insert (s1);
         System.out.print ("Student Account Information Stored In Student List);
    class StudentLinkedList
         private Student head;
         public LinkedList() { head = null; }
         public void insert(String s)
              Student temp = new Student(s);
              temp.next = head;
              head = temp;
         public String delete_first()
              if(head == null)
                   return null;
              String result = head.readName();
              head = head.next;
              return result;
         public String delete_last()
              if(head == null)
                   return null;
              if(head.next == null)
                   String result = head.readName();
                   head = null;
                   return result;
              Student temp = head;
              while(temp.next.next != null)
                   temp = temp.next;
              String result = temp.next.readName();
              temp.next = null;
              return result;
         public void printList()
              Student temp = head;
              while(temp != null)
                   System.out.println("Name: " +temp.readName());
                   temp = temp.next;
              System.out.println();
         public boolean searchList(String s)
              Student temp = head;
              while(temp != null)
                   if(temp.name.equals(s))
                        return true;     
              else
                   temp = temp.next;
              return false;
    public class AccountTest
         public static void OpenGeneralAccount (OwnerLinkList OwnerList, AccountLinkList accountlist)
         bufferedReader in = new BufferedReader (new InputStreamReader (System.in));
              String line =" ";
              String name =" ";
              String street =" ";
              String town =" ";
              int id= 0;
         try{
         System.out.println("Enter Owner Name : ");
         name = in.readLine();
         System.out.println(" Enter Owner Street : ");
         street = in.readLine();
         System.out.println(" Enter owner town : ");
         town = in.readline();
         System.out.println(" Enter id No: ");
         line = in.readLine();
         id = Integer.valueOf(line).intValue();
         catch(Exception e) {}
         Owner 01 = new Owner (name, street, town);
         ownerlist.insert(a1);
         System.out.print(" Owner "+name+ " inserted into Owner List");
         Account a1 = new Account(id,o1);
         accountlist.Insert (a1);
         System.out.print ("General Account Information Stored In Account List);
    public static void PrintOwnerLinkList ( OwnerLinkList ownerlist)
         System.out.println("Printing Owner List..................");
         ownerlist.printList();
         System.out.println();
    public static void PrintAccountLinkList ( AccountLinkList accountlist);
         System.out.println("Printing Account List..................");
         accountlist.printList();
         System.out.println();
    public void main (String args[])
         OwnerLinkList ownerlist = new OwnerLinkList();
         AccountLinkList accountlist = new AccountLinkList();
         LecturerLinkList lecturelist = new LecturerLinkList();
         StudentLinkList studentlist = new StudentLinkList();
         BufferedReader in = new Buffereder(new InputStreamReader (System.in));
         String line;
         int menuchoice = 0;
         System.out.println();
         System.out.println("Library Main Menu");
         System.out.println("-----------------");
         System.out.println("1. Open General Account");
         System.out.println("2. Check Number Of Books On Loan");
         System.out.println("3. Borrow Book");

    main.......im very confused....only been doing java 3 months....well the problem is main getting it all hooked up with switch statement...to call the whole thing....eg 1: open account
    2: check books on loan
    i have bits and peices done of it.....but trying to get it to make sence......as you can see im very poor at java.....and need all the help i can get.....so any advice would be nice ....thanx

  • Java screen refresh problems

    I've recently noticed problems running Java applications under 10.4.8, with the latest Java DST updates - Java version is reported as:
    java version "1.5.0_07"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-164)
    Java HotSpot(TM) Client VM (build 1.5.0_07-87, mixed mode, sharing)
    I've seen problems running CLC Free Workbench (http://www.clcbio.com/free/) and Cytoscape (http://www.cytoscape.org/). When I launch the applications, the application window is not drawn correctly. Buttons and tabs are not drawn properly (edges misaligned or missing); some window elements fail entirely to display; menu labels may not be drawn, although clicking where the menu should be will drop down the menu. When I resize the window, redraw will typically fail entirely, although I can in some cases get elements to redraw by mousing over them. Basically, the applications are unusable.
    When I launch Java Preferences or Java cache viewer, those windows also fail to draw, and I'm left looking at a blank rectangle.
    A colleague running the same OS an Java versions has no problems on his Macbook - the applications display correctly. I'm running on a dual 1GHz PowerMac G4 (MDD).
    Any suggestions as to how I can get my Java to draw to the screen?
    Thanks,
    Chris
    Powermac G4 MDD, Dual 1GHz   Mac OS X (10.4.8)  

    Following up on my own question - I took some advice I read in another thread, and created a new test account to see if the problem is specific to my account. Apparently it is as both problem applications display just fine when logged into the new account.
    So, the question becomes why is my account having problems displaying Java apps? What can I flush/reset/delete to make things display properly again?
    Powermac G4 MDD, Dual 1GHz Mac OS X (10.4.8)

  • Java 6 causing problems with Forms 10.1.2.0.2

    I recently installed Sun Java 6 JRE to my Windows XP machine - I have previously been using Java 5 JRE (1.5.0_09).
    When I run my Forms applications from any of our appservers (10.1.2.0.2) (i.e. dev, test, prod) I can get by the login no problem but then get presented with a 'blank' browser window. I say 'blank' because the menu and status bar are present but no forms are displayed.
    In the Java console (tracing set at level 5) I see the following error ...
    network: Connecting http://dbdev.kelman.com:7780/forms/lservlet/;jsessionid=ac1d027f30d62f783e1e32bd4b9295bce539576dad6f.e3aNbxiTbNuMe38Kah0Sb34Pa3n0n6jAmljGr5XDqQLvpAe with cookie "oracle.uix=0^^GMT-7:00"
    network: Cache entry not found [url: http://dbdev.kelman.com:7780/forms/java/oracle/bali/share/sort/StringComparator.class, version: null]
    network: Connecting http://dbdev.kelman.com:7780/forms/java/oracle/bali/share/sort/StringComparator.class with proxy=DIRECT
    network: Connecting http://dbdev.kelman.com:7780/forms/java/oracle/bali/share/sort/StringComparator.class with cookie "oracle.uix=0^^GMT-7:00"
    Exception in thread "AWT-EventQueue-2" java.lang.NoClassDefFoundError: oracle/bali/share/sort/StringComparator
         at java.lang.Class.getDeclaredMethods0(Native Method)
         at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
    I uninstalled Java 6 and then was able to run the web forms just fine.
    I reinstalled Java 6 and I'm back to the same problem.
    Anyone run across this ?
    Message was edited by:
    markhooper
    null

    This is for the benefit of everybody who are trying to run Forms 10g on the web with Oracle Application Server 10.1.2.0.2 and JRE/JDK 1.6.
    Technically speaking Oracle Support's claims of not being able to certify Forms 10g on Java 1.6 has been due to the way JRE/JDK behaviour which has been changed from 1.6 onwards. Aparently from Java 1.6 onwards, there is a check for all the imported files while classes are being loaded. Although some are not needed by forms they are still checked and an error occurs if they are not present (Note: 748324.1).
    The solution to the problem is to apply the patch 10.1.2.3 (https://updates.oracle.com/ARULink/PatchDetails/process_form?patch_num=5983622) which is about 1.7Gb for Linux-x86 platform.
    The underlying issue is the way FRMALL.JAR file not having the class oracle.bali.share.sort.StringComparator. Aparently from 10.1.2.3 onwards, Oracle have included this file in the FRMALL.JAR file as a standard bundle, which resolves the bug and completes the java archive.
    Alternatively, you may be able to try the one off patch 7384879 (FORMS 10.1.2.3 JAR FILE EXPIRE JANUARY 2009) which is about 4.6Mb from which you can extract the FRMALL.JAR file and replace the original file in the iAS installation.
    Though I have not tested this personelly, this could be a faster way out of the problem.

  • Ess webdynpro java iview personalization problem

    Hi,
    we have a problem with the personalization dialog of the ESS-WebDynpro JAVA Applications (f.e. CATS, WhoISWho, Adress...) which the end user gets with Ctrl-Right mouseclick.
    Our portal and HCM Backend use language "DE" (Germany). The personalization dialog ist shown always in english. Is ist possible to change the language of the personalization dialog ?
    Regards

    HI,
    If you set the language as DE for the User performing the Personalisation and if you get all the portal standard menu in DE,  then it should show the personalisation  Dialog in DE.
    I had the same issue for Korean Language and i Did the personalisation successfully (text chage for Korean)
    so i think it should work for you case also.
    Regards
    Rajendra

Maybe you are looking for