Thanky you for the help, -Ted On Sep 28, 7:33 pm, "Moria Shebsovich" <mshebsov...@xifin.com> wrote: > Hello, > > You are receiving this error because you call add() method to class > instead of to instantiated object when your method add () is not static > and must be called to an instance. > > Try this: > > HorizontalPanel row = new HorizontalPanel(); > > public void Crow() > { > row.add(edit); > row.add(del); > rowl.add(email); > } > > Regards, > Moria. > > > > -----Original Message----- > From: java-ee-j2ee-programming-with-passion@googlegroups.com > > [mailto:java-ee-j2ee-programming-with-pass...@googlegroups.com] On > Behalf Of tedpottel > Sent: Monday, September 28, 2009 3:15 PM > To: Java EE (J2EE) Programming with Passion! > Subject: [java ee programming] could some explain the error cannot make > a static refrence to a non static method > > Hi I get the following error in elpse > > Hi, > On the 3 lines > HorizontalPanel.add(edit); > HorizontalPanel.add(del); > HorizontalPanel.add(email); > eclipse gives me the following error > cannot make a static refrence to a non static method. Could some one > explain this to me. > > package pNewsLetter2.client; > > import com.google.gwt.user.client.ui.*; > > public class cRow { > > Button edit = new Button("edit"); > Button del = new Button("del"); > Label email = new Label("empty"); > HorizontalPanel row = new HorizontalPanel(); > > public void Crow() > { > HorizontalPanel.add(edit); > HorizontalPanel.add(del); > HorizontalPanel.add(email); > } > > } > > TedcRow- Hide quoted text - > > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en -~----------~----~----~----~------~----~------~--~---