Pass a panel to other constructer

the problems is this:
public class User
Panel p;
public User(Panel p)
this.p=p;
public class Gui extends Applet
private Panel pan;
public void init()
pan=new Panel();
User u=new User(pan);
the compiler give me:
cannot resolve symbol
symbol:constructer user(java.awt.panel)
location:class user
User u=new User(pan)
what is the problem?
my user class is in the same directory
when i write:
User u=new User();everything is wright without error
why i cant pass a panel to the user constructer when that constructer except to get the panel?

The following code compiles with no errors on my system.
import java.awt.Panel;
public class User {
   Panel p;
   public User(Panel p) {
      this.p=p;
import java.awt.Panel;
import java.applet.Applet;
public class Gui extends Applet {
   private Panel pan;
   public void init() {
      pan=new Panel();
      User u=new User(pan);

Similar Messages

  • Unable to pass the parameter to other portlet

    Hi,
    I am trying to pass the parameter from one portlet to other portlet using the convention below...
    Example say you have two reports on a page dept and employee. You want to refresh employee report by clicking on
    the dept in the department report in the same page.
    (1) Create the first report based on the query
    SELECT htf.anchor('http://domain/servlet/page?&_pageid=97&_dad=portal_dad&_schema=portal_schema&_mode=3&dept_code='||DEPTNO,DEPTNO) Department,
    dname FROM scott.dept;
    (2) Create a 2nd report
    select * from EMP where DEPTNO = :dept_code
    (3) In the the additional pl/sql code section before display page on the 2nd report do this
    portal30.wwv_name_value.replace_value(
    l_arg_names, l_arg_values,
    p_reference_path||'.dept_code',portal30.wwv_standard_util.string_to_table2(nvl(get_value('dept_code'),10)));
    (4) Created a page and added these reports as portlets.
    In point (4) I am not getting the value of selected deptno in 'dept_code'. It is always taking the default value as '10'...
    I like to have the quick solution for this so that I can show the demo to my client...
    Thanks in Advance
    Sudheer

    Hi Ali,
    We can add parameterized queries to any TableAdapter (and controls to accept parameter values and execute the query) using the
    Search Criteria Builder Dialog Box. 
    For detail information, please refer to the following article to create a Windows Form to Search Data:
    http://technet.microsoft.com/en-us/library/hbsty6z7.aspx
    In addition, this issue is more related to Windows Form. I would suggest open a new thread in Windows Form forum if you have any more qestions:
    http://social.msdn.microsoft.com/Forums/windows/en-US/home?forum=winforms
    Regards, 
    Elvis Long
    TechNet Community Support

  • Since I ipdated photoshop CC 2014, my layers and brush panels (and others) will not stay open. AS soon as I open them, they close. Anyone have any ideas on how to fix this?

    Trying to open my layers or brush panels in photoshop Cc 2014 and they won't stay open. They close as soon as they open. This started immediately following the latest update that I ran today.

    Try resetting the PS preferences and check if it's an issue with corrupt preferences : http://forums.adobe.com/thread/375776
    Try to open PS in Plugin Disabled mode and check the same. For that Press Shift+PS icon and hit Yes.
    ~ Arpit

  • Passing a session (or other scope) variable to a graphModel

    So here's my delimma... I'm using 11.1.1.3g Jdeveloper.
    I'm trying to get a graph which is gets its value from a View (which takes as an input a single variable). See definitions of some of these below. I'm trying to get the graph to pass the variable via binding to the view so that the query will return the graph's data based on the query. I'd like to use ADF's binding layer to do this and not involve a backing bean I'm not too sure how to begin. I've been through a lot of the documentation and cannot find exactly how this can be done. I've seen that you can do a master detail but this is not what I want (At least yet) I'd like to setup the value that in a DDL that the user can select from a change the graph below.
    InventoryView:
    SELECT kit_status, component_id, count(*) as total
    FROM numbered_inv
    WHERE trialname = :0     
    AND kit_status in ('AVAILABLE', 'ASSIGNED/USED', 'PACKAGED')
    AND site_id in ( '0000', '00001' )
    GROUP BY component_id, kit_status
    ORDER BY kit_status
    :0 is bound to bind_trialName
    Page Def so far:
    <?xml version="1.0" encoding="UTF-8" ?>
    <pageDefinition xmlns="http://xmlns.oracle.com/adfm/uimodel"
    version="11.1.1.56.60" id="shipFreqPageDef"
    Package="com.almac.aurora.gateway.clinicalsupplies.pageDefs">
    <parameters/>
    <executables>
    <variableIterator id="variables">
    <variableUsage DataControl="PCSAppModuleDataControl"
    Binds="Inventory1.variablesMap.bind_trialName"
    Name="ExecuteWithParams_bind_trialName"
    IsQueriable="false"/>
    <variable Type="String" Name="robsVariable"/>
    </variableIterator>
    <iterator Binds="Inventory1" RangeSize="-1"
    DataControl="PCSAppModuleDataControl" id="Inventory1Iterator">
    </iterator>
    </executables>
    <bindings>
    <graph IterBinding="Inventory1Iterator" id="Inventory1"
    xmlns="http://xmlns.oracle.com/adfm/dvt" type="BAR_HORIZ_CLUST">
    <graphDataMap leafOnly="true">
    <series>
    <data>
    <item value="componentid"/>
    </data>
    </series>
    <groups>
    <item value="total"/>
    </groups>
    </graphDataMap>
    </graph>
    <action IterBinding="Inventory1Iterator" id="ExecuteWithParams"
    RequiresUpdateModel="true" Action="executeWithParams">
    <NamedData NDName="bind_trialName" NDType="java.lang.String"
    NDValue="${bindings.ExecuteWithParams_bind_trialName}"/>
    </action>
    <attributeValues IterBinding="variables" id="bind_trialName">
    <AttrNames>
    <Item Value="ExecuteWithParams_bind_trialName"/>
    </AttrNames>
    </attributeValues>
    Pointing me to a tutorial that updates a DataModel based on an input from the session or from a DDL would be helpful. I cant seem to find one...
    Thanks in advance!!

    Sorry I'm still having trouble figuring this out. So, on my graph (shown below) I have the value referring to the binding... How do I make the binding pass the view a value?
    <dvt:graph id="horizontalBarGraph1"
    value="#{bindings.Inventory1.graphModel}"
    graphType="#{backing_shipFreq.graphType}"
    dynamicResize="DYNAMIC_SIZE"
    styleClass="AFStretchWidth">
    <dvt:background>
    <dvt:specialEffects/>
    </dvt:background>
    <dvt:graphPlotArea/>
    <dvt:seriesSet>
    <dvt:series/>
    </dvt:seriesSet>
    <dvt:o1Axis/>
    <dvt:y1Axis/>
    <dvt:legendArea automaticPlacement="AP_NEVER"/>
    </dvt:graph>

  • Adding a panel over other components in the main mxml application

    Hi,
    I've created a main mxml file that contains,among other things, a button, and another mxml that contains a panel with some options. I want to be able to add that panel to the main mxml OVER all other components in the main mxml file with a mouse click on the button in that main mxml. How can this be done, please help ?

    Hi mesanarapscallion,
    Can you please post the sample code you are working...
    Do you want to show the panel component on all the thing above in the main.mxml file...Do you have all the other things positioned at the same position..?
    Thanks,
    Bhasker Chari

  • Folio Builder panel crashing + other issues

    Hi,
    I have been facing difficulties in updating any of my folio articles on the Folio Builder panel in Indesign CS6 this whole week. An article that contains of three spreads and a file size of around 60 mb takes up to an hour to update and most of the times the panel crashes straight after the upload is complete and hence the update don't go through. When the panel crashes I just see the panel with a blank space inside it, no folios and I can not sign out — I have to restart InDesign.
    After several attempts, quitting InDesign and opening it up again, opening up the panel again and trying to update the article then [sometimes] it works – still very slow, but it doesn't crash and when it does, I have to do this over again.
    And on Content Viewer, downloading the folio updates takes longer than usual. Again only this week.
    My folios are on the cloud. My internet is pretty quick, DL 60 mb/s and UL 600 mb/s so there are certainly no problems with my internet connections. And all my DPS files are up to date. It usually takes maximum an hour to upload the whole folio, it took 8 hours yesterday.
    Thanks,
    Bilal

    Uninstall and re-install the Digital Publishing Suite Tools for CS6. If that doesn't resolve the issue, un-install and re-install InDesign CS6.

  • Passing EJB reference to other Thread

    Hi,
    If I have EJB reference, can I pass it to other thread safely?
    COM had concept of Apartments to handle thread problems and we had to marshal the interfaces if passed to another thread.
    What we do in EJB? Is there any concept like apartments that is hidden?
    Thanks,
    Unmesh

    Within the appserver, EJBs should not be doing anything with threads.
    If we are talking about an external app (ie: a client GUI) holding references, then yes these can be passed around between threads freely.

  • How could I pass object to the other object

    Hi,
    How could I pass an object to the new initializing object, so that I can reference to the first object later?

    You mean something like
    MyClass1 myclass1 = new MyClass1();
    MyClass2 myclass2 = new MyClass2(myclass1); // <-- myclass1 is being passed to the constructor of myclass2                                                                                                                                                                                                                                                                                                                                                       

  • High Pass Sharpening Panel

    Include more Options for sharpening in Lightroom 4.
    I absolutely love USM, but I also love High Pass sharpening.
    A photographers workflow could be rgeatly sped up if they could do high pass sharpening in Lightroom 4.
    I currently send me photos from LR>Photoshop>LR just to do High pass sharpening.

    I know I've asked about another feature on this forum and you, Jeff, have given me a solid answer to a query that probably was more twisted and not an easy one to answer but I have to agree with you on this issue.
    Why would anyone want to change what is considered by many users to be a superb sharpening engine and implementation in Lightroom?
    I honestly don't find myself transferring many "straight" files into Photoshop for further sharpening since we've had the new sharpening tools and alt-key preview - and the output sharpening is great for both large and small prints on various media types that I print on as part of my business.

  • CC Interface - CSS Designer Panel and Other Panels - do not close

    I do not know what I did, but if I am in Code, Split, Design, or Live view the CSS Panel I have docked on the right does not minimize.  It used to but no longer.  I did not explicitly change any preferences. I just know it is something simple but I am stumped for now.
    Anyone have any suggestions?
    Thanks!
    Jerry

    Hi Jerry,
    Did you try resetting the workspace in the application toolbar?
    Please read more about customizing the Dreamweaver workspace
    http://help.adobe.com/en_US/dreamweaver/cs/using/WScbb6b82af5544594822510a94ae8d65-7f82a.h tml
    Else you can try resetting preferences for Dreamweaver as well.
    http://helpx.adobe.com/dreamweaver/kb/restore-preferences-dreamweaver-cs4-cs5.html
    Thanks
    Bhawna Gupta

  • Can not pass contactID to an other State (page)

    Hi,
    I am trying to pass the contactID from this grid to
    contactdetail page load from contact state. It's load fine but did
    not select the right record of contactdetail page. Any idea what I
    am mssing here?
    I do have funtion Edititem in the scripting block as below:
    private function EditItem(key:Object):void
    var e:SelectionEvent;
    if( key == null )
    e = new SelectionEvent("addItem", key);
    else
    e = new SelectionEvent("editItem", key);
    this.dispatchEvent(e);
    <mx:DataGrid doubleClickEnabled="true"
    id="contactsGrid"
    doubleClick="Application.application.currentState='Contact';EditItem(this.contactsGrid.se lectedItem.ContactID)"
    dataProvider="{contacts}"
    editable="false" width="100%" height="100%">
    <mx:columns>
    <mx:DataGridColumn dataField="ContactID" headerText="ID"
    width="30" />
    <mx:DataGridColumn dataField="FirstName"
    headerText="First Name" />
    <mx:DataGridColumn dataField="LastName" headerText="Last
    Name" />
    <mx:DataGridColumn dataField="Title" headerText="Title"
    />
    <mx:DataGridColumn dataField="Type" headerText="Type"
    />
    <mx:DataGridColumn dataField="Phone" headerText="Phone"
    />
    <mx:DataGridColumn dataField="Ext" headerText="Ext" />
    <mx:DataGridColumn dataField="MobilePhone"
    headerText="Mobile Phone" />
    <mx:DataGridColumn dataField="Email" headerText="Email"
    />
    </mx:columns>
    </mx:DataGrid>

    I have tried a similar way in my application and it worked.
    This error may have occured coz ContactId is not getting
    populated. Are you able to see the ID column perfectly populated?
    . One more debugging technique is to trace the results or put
    in alerts for displaying contactID value.This will help you to
    figure out wjether the value is getting populated in key or not.
    Ex:
    private function EditItem(key:Object):void
    var e:SelectionEvent;
    Alert.show(Key.toString()); //new line
    if( key == null )
    e = new SelectionEvent("addItem", key);
    else
    e = new SelectionEvent("editItem", key);
    this.dispatchEvent(e);
    If this doesnt show any proper output then try to make key as
    the type of ContactID (i.e string or Int etc)

  • Can my Mac pass Windows viruses to other Windows machines on the network

    System Adm is telling me that I cannot connect my Mac to the school network if I am using a private line that is not passing through the school firewall because I could infect his network. Is that truly the case?
    Thanks,
    todd

    In addition to Graham's excellent information (I may be repeating some of it).
    You can spread these by sending infected documents or e-mails to other users.
    Completely true. If you receive Windows malware on your Mac via email, it can't do a thing to OS X, but you can infect a Windows user by forwarding that email with the attachment still intact.
    Running Microsoft VirtualPC for Mac exposes your Mac to all Windows viruses.
    True, but not quite the way it reads. VirtualPC is for running Windows via emulation on your Mac. The Windows environment can be infected the same as any Windows PC. It cannot expose your Mac to those viruses. More specifically, they cannot in any way infect OS X.
    Macro viruses, such as those written for Microsoft Office products, can infect your Mac or destroy data.
    Yes and no. Macro viruses tag along on infected Word documents. I have yet to see or hear of one that can do anything to OS X. So like email Windows malware, you simply become a carrier. When you get a document with a macro virus and you ignore the warning to open the document without loading the macro, it will infect your Normal document (Office X or 2004) the same as it would in Windows. From then on, Word on your Mac will infect all documents you save. One way to avoid that is to set the preferences in Office to never load macros. The other is to disallow macros to load when you open any document that has one (Word will ask you what you want to do). If Office 2008, macros have been removed from the program. You can't infect any new documents, but I don't know if opening a file that already carries macros will be stripped. It may just save them with the file again when you save an existing file with your changes. As far as the last point? No, Word macros cannot destroy data on your Mac. They are all written for Windows and will not run in OS X any more than a Windows program can.
    Implementing Boot Camp and installing Microsoft Windows on your Intel®-based Mac exposes that computer to the same threats as running Windows on a PC.
    Completely true. Windows is Windows. The hardware it's running on makes no difference. The Windows partition on your Mac will be exposed to all Windows malware as a Dell would be.

  • Issues with color panel and other windows on right side of flash

    Ok the issue I'm having with flash is that the windows on the right side of my flash window do not snap up when I collapse a window. I am attaching a screen shot to better explain this issue.
    As you can see I have the color panel collapsed up, when I expand this panel and it goes down everything shifts down. however when I collapse it back up a huge gap is left behind in CS5.5 as is displayed in screen shot number 2. In CS4 I never had this problem. I could expand and collapse panels as I saw fit with no problems what so ever. Everytime now that I expand a panel and collapse it, the library or other panels do not move up with the collapsing. This causes a workspace issue. and forces me to drag up the library via the black line that is just above it but below the align panel so that I have better access to my library or properties panel for when I'm working. I find this highly annoying and would like it if there could be a fix produced to make it so this collapsing issue can be fixed and I don't have to waste time dragging up the library/properties panel everytime I need to access stuff in my library when I have a huge list of graphics I'm going through.
    Thanks
    h_cline2

    I already tried that, first thing I thought of before coming to the forums for a solution.
    Thanks anyways.
    Any other ideas?

  • Correct variables that need to pass to rwrun60 and other questions

    Hello all from sunny Manchester.....
    I have questions from those pesky developer types that i can't answer. Is there an angel out there..?
    Questions:
    1. What are/where can I find the variables I need to pass to rwrun60? Anybody have an example?
    2. Also, is the rwrun60 the command line version equivalent to r25run?
    3. Is the command a stand alone executable i.e. it does not talk to a report server?
    4. What are the rwrun60c and rwcli60 commands and how do we call these?
    Answers on a postcard to... :-)

    1) The rwrun60 is Oracle's Reort runtime executable. You can find a list of the command line params you can pass to this by opening the help file (oracle reports developer) and typing rwrun60.
    2) Yes.
    3)Yes it can be used as a stand-alone command.
    4) Also found in help

  • Passing values and calling other classes?

    Hello all.
    I have 2 classes(separate .java files). One is a login class and the other is the actual program. Login class(eventually exe file) should open the other class and pass the login parameters if you know what I mean. Is this possible, or do the 2 classes need to be part of one file?
    Thanks alot
    Milan D

    Login class can be another class in another file
    wht u have to do is to make an instance of login class in the class u want to use that class
    like login lg = new Login();
    and call method of login class
    lg.setUser(username);
    where setUser(String user); is a method of login class
    this way u can pass the parameters to login class
    i hope this might be helpful
    regards
    Moazzam

Maybe you are looking for

  • Skype notifications problem with dual monitors

    A few days ago I did a fresh install of arch on my laptop (intel graphics) and since then when I am using 2 monitors, one 1366x768(primary-right) and the other 1920x1080, Skype notifications that are supposed to be shown on the primary monitor do not

  • Help! No longer able to add songs to Ipod.

    Hi everyone, I'm new to this forum. I did not know where to turn for help. I have been trying to add new songs to my ipod for the last several weeks without success. I can add them to the library. I am able to drag them from the library to my ipod ic

  • Java.lang.IllegalStateException: setAttribute: Session already invalidated

    Hi All, I am installing webcenter sites 11.1.1.8.0 on remote linux machine but after say 80% of installation i am getting following error : [2013-10-07 16:44:06,603 IST] [ERROR] [http-bio-9084-exec-1] [fatwire.logging.cs.session] Exception checking s

  • DW8 does not display my page

    http://www.direct2usales.com/CONTENT.HTM Just installed DreamWeaver 8.0.2 and loaded first file In CODE mode, I see the code... but no matter what I do in DESIGN mode, all I see is a "bar" across the top of the page (If I press F12 to view in browser

  • How can i edit the text in a fillable pdf form?

    I ve a fillable pdf form that needs to be updated - minor change such as 2011 into 2012. I've tried to type in the new text in but I could not manage to change it. any idea on how to do it? sorry but i'm not familiar with the abobe x pro at all. Than