Can we initialize the object of color class??

actually i have to store value of colors in the array of Color class ,i want to initialize the array with white color is it possible ?

There are two ways to do it:
1) You have a varying number of colors
Color[] colorArray = new Color[numberOfColors];
for(int i = 0; i < colorArray.length; i++)
    colorArray[i] = Color.white;
}2)You have a fixed number of colors (for example three colors).
Color[] array = {Color.white, Color.white, Color.white};If you have a large number of colors to initialize method 1) may be better.

Similar Messages

  • Can I create the object of an protected inner class of a Base class in to t

    Dear All,
    Can I create the object of an protected inner class of a Base class in to the subclass ?
    e.g.
    public class Base{
         protected class Inner {};
    Public class Sub extends Base{
         Public Inner amethod (){
              Return new Inner(); //here I get an exception as
                                //Inner has protected access
    }Regards,
    Ishan

    @Op. The code that you posted isn't close to compiling. Java is case sensitive. It should be public and not Public, and return instead of Return.
    Kaj

  • Is it possible in an html to call the objects of a class?

    Hi,
    Please help me.I have already posted it, but it's very urgent i am in need for an working answer.
    I am calling an applet class 2 times in a browser.To share some variable i have declared as private static. But when i call these applets are called in different browsers , still these variables are shared.
    Actually i want the applets in one browser to be independent of the other applets in a separate browser. Can anyone help me to solve this problem?
    Is it possible in an html to call the objects of a class?
    Is there any some workarounds? For instance calling applets in separate JVM in the same machine.Any idea how to do that?
    Another option is using something like the session variables. But is that possible in a variable inside the applet class?
    Thanks in advance to all the solutions. Hope someone clicks an idea from the above possibilities.

    To get a reference to other applets in the same JVM (actually same browser window), do the following:
    //get a reference to the other applets in the same browser window
    java.applet.AppletContext appCon = yourAppletRef.getAppletContext();
    JApplet applet = (JApplet) appCon.getApplet(otherAppletName);or use AppletContext.getApplets() to get an enumeration of all the accessible applets. If you want to use the Session object to store your values, then, in your javascript, make a call to the applet methods. Use JSP expressions for the value of these session String values (i.e. <%= %>) to set the parameters of your applet methods. In a nutshell, it is possible. I hope this helps.

  • I am trying to copy a document and I keep getting the error "Can't paste the objects. The requested transformation would make some objects fall completely off the drawing area."

    I am trying to make duplicate documents with minor adjustments to each and when I try to copy the artwork from one document and paste it into the new document I keep getting the error "Can't paste the objects. The requested transformation would make some objects fall completely off the drawing area." Both documents are exactly the same size, res, color format etc. I even tried to drag and drop and get the same error message. Anyone know what I can do to resolve this issue?

    Try scaling the view size down to 6% or so and then do a Select All. See if there are objects off the artboard which may be causing this error. Most often you will see this if there were guides dragged from a ruler which were selected by dragging the white arrow and then deleted. This leaves the anchor points at the edge of the work area.

  • How can i open the popup from java class

    Hi,
    Please tell me how can i open the popup from java class.
    I am using jdev 11.1.1.7.0
    I have used the below code which works fine in jdev 2.1 but it will have some errors in 11.1.1.7.0.
    Please tell me some way to do this in all jdev versions.
    Bean obj = (Bean)RequestContext.getCurrentInstance.getExternalContext.getPageFlowScope(“obj”);
    Code for hide pop-up
    FacesContext context = FacesContext.getCurrentInstance();
    String popupId = obj.getPopUpBind().getClientId()
    ExtendedRenderKitService service = Service.getRenderKitService(FacesContext.getCurrentInstance(),
    ExtendedRenderKitService.class);
    String hidePopup = "var popupObj=AdfPage.PAGE.findComponent('" + popupId +
    "'); popupObj.hide();";
    service.addScript(FacesContext.getCurrentInstance(), hidePopup);
    Code to Show pop-up
    StringBuffer showPopup = new StringBuffer();
    showPopup.append("var hints = new Object();");
    showPopup.append("var popupObj=AdfPage.PAGE.findComponent('" +
    obj.getPopUpBind().getClientId() + "');popupObj.show(hints);");
    service.addScript(FacesContext.getCurrentInstance(), showPopup.toString());
    Code need to be added in jsff pop tag
    binding="#{pageFlowScope.bean.popUpBind}
    Variable need to be added in Bean.java
    private RichPopup popUpBind;

    Hari,
    Since you're using a non-public build of JDeveloper, you should be using a non-public forum.
    John

  • How to initialize the object type in pl/sql

    Hi,
    I am looking for an easy way to initialize the object type in pl/sql.
    I have created a object type with around 2 attributes.
    when ever i need to initialize the object ..need to pass:
    declare
    v_obj emp_obj;
    begin
    v_obj := emp_obj(null,null);
    then i can assign the values to object.
    Since I am having more than 50 attributes.. need to pass null to all the object attributes.
    is there any other way to initialize the object.
    thanking you in advance!!!

    RTFM [url http://oraclesvca2.oracle.com/docs/cd/B10501_01/appdev.920/a96594/adobjadv.htm#1008810]Advantages of User-Defined Constructors

  • How can i display the result of java class in InputText ?

    Hi all,
    How can i get the result of java class to InputText Or OutputText ???
    also can every one in the forum give me road map for dealing with java in oracle adf because i'm beginner in oracle adf
    i saw some samples in oracle adf corner but it's difficult for me.

    User,
    Always mention your JDev version, technologies used and clear usecase description (read through this announcement : https://forums.oracle.com/forums/ann.jspa?annID=56)
    How can i get the result of java class to InputText Or OutputText ???Can you elaborate on your requirement? Do you mean the return value of a method in a class as output text? Or an attribute in your class (bean?) as text field?
    -Arun

  • How can you move the objects from one server to another?

    how can you move the objects from one server to another?

    Hi,
    Collecting objects for Transporting
    1. rsa1->transport connection
    2. left panel choose 'object type', middle panel choose 'infocube' and 'select objects'
    3. then choose your infocube and 'transfer'
    4. will go to right panel, choose collection mode 'manual' and grouping only 'necessary objects'
    5. after objects collection finished, create request
    6. If they are $TMP, then change the package.
    7. When you click the Save on the change package, it will prompt for transport. Here you can provide an existing open transport request number, or if you like here itself you can create a new one.
    8. You can check the request in SE09 to confirm.
    Releasing Transport Request  
    Lets say you are transporting from BWD to BWQ
    Step 1: In BWD go to TCode SE10
    Step 2: Find the request and release it (Truck Icon or option can be found by right click on request #)
    Note: First release the child request and then the parent request
    Steps below are to import transport (generally done by basis )
    Step 1: In BWQ go to Tcode STMS
    Step 2: Click on Import queue button
    Step 3: Double Click on the line which says BWQ (or the system into which transport has to be imported)
    Step 4: Click on refresh button
    Step 5: High light the trasnport request and import it (using the truck icon)
    Transport
    http://help.sap.com/saphelp_nw2004s/helpdata/en/b5/1d733b73a8f706e10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/en/0b/5ee7377a98c17fe10000009b38f842/frameset.htm
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/media/uuid/224381ad-0701-0010-dcb5-d74236082bff
    Hope this helps.
    thanks,
    JituK

  • How can I change the font and color of an email signature?

    How can i change the font and color of an email signature?

    Mail > Preferences > Signature
    Highlight the Signature.
    Click Format in the menu bar and select " Show Fonts".
    Select the Font.
    Highlight the Text.
    Click Format in the menu bar and select " Show Colors".
    Select the color.
    Mail > Preferences > Composing > Message Format:  Rich Text
    Best.

  • How can i change the font and color in mail 5?

    how can i change the font and color in mail 5?

    Mail -> Preferences -> Fonts & Colors
    If you want to change the font and color in a message you're composing, you can right-click on the message and use the Font/Show Fonts command to bring up the Font panel (among other ways).
    Regards.

  • Can we check the Objects modifiable " option for standard objects

    Dear Friends
                 In IR , we have imported SRM SERVER->SRM SERVER5.5
    Then we  have checked the option<u><b> "Objects are modifiable"</b></u> then we imported the IDOC from R/3 system under SRM SERVER 5.5 swcv.
    Then created the mapping.It is working fime.
    how ever i am not sure whether it is right process.Can we check the "Objects are modifiable" for standard compoents delivered by SAP????
    Regards
    chandra

    Hi Jai,
      <i> >>>Can we check the "Objects are modifiable" for standard compoents delivered by SAP????
    No. As best practise you are not supposed to do so.</i>
    In order to implement any changes in the mapping we can do it rite.
    Because recently i have applied one SAP note to my SRM swcv and one of the MM object was changed according to the requirements.
    Thanks,
    Prasanthi.

  • I use Aperture 3 how can I have the tool bar colored?

    I use Aperture 3, how can I have the tool bar colored?

    Thanks for your help, for the time beeng i will follow your suggestion: "learn to love the new look."
    In any case I strongly recomend Apple to correct the Aperture 3 software.
    Have a nice day
    Sergio

  • Can't scale the objects. The requested transformation would make some objects too small to use.

    How does one remedy this Adobe error message? "Can't scale the objects. The requested transformation would make some objects too small to use." This one always gets me. I'll spend more time trying to find the object in question. This has happened in almost al versions, but this time it's CS5.

    Hmm, possible solution would be to select your object(s), scale them to 90%, and then hit Cmd+D or Control+D to repeat the transformation. I read that sometimes if you scale down too much and too fast it can cause this message.
    Hope this works for you!
    Michael

  • ActiveX can´t create the object xl reporter

    hola tengo SAP BO 2005
    con el xl reporter ahora que lo quiero correr me aparece el error de que el ActiveX can´t create the object
    probe reinstalando todo y nada, asi como cambiando el dll de los lenguajes
    alguna otra sugerencia
    gracias

    Estimado Salvador,
    Gracias por remitir su inquietud al soporte de SAP B1 en español.
    Inicialmente le pedimos verifique que esta utilizando una versión soportada de Microsoft Office. Tal y como se documenta en el Service Market Place:
    https://service.sap.com/smb/sbo/platforms                   
    Si cuenta con alguna de las versiones soportadas, verifique lo siguiente :                                                                               
    El mensaje de error podria estar relacionado a el DI API. Favor aplicar los siguientes pasos:
    1.  Ubicar el archivo '"temp" por medio de  Start -> Run , tipear  %temp%.    
    2.  Ubicar la carpeta  SM_OBS_DLL folder y borrarla.                  
    3.  Desde añadir/remover programas, desinstalar el DI API.                      
    4.  Reiniciar el PC.                                                      
    5.  Instalar el  DI API desde la carpeta del parche en uso (en la carpeta "packages")   
    Esperando lo anterior les permita solventar lo reportado.
    Queda a sus gratas ordenes,
    Juan Manuel Marrero
    SAP Business One Forums  Team

  • How can I Serialize the Object of org.apache.xalan.transformer.TransformerI

    Teachers:
    How can I Serialize the Object of org.apache.xalan.transformer.TransformerImpl.

    org.apache.xalan.transformer.TransformerImpl doesn't appear to be serializable... what do you try to achieve?

Maybe you are looking for

  • Software not installing

    Nearly every time I've tried to install software that I've packaged using the Creative Cloud for Enterprise Packager, the install fails. No warning, no error message, nothing in the event logs, nothing. It happens whether I run the Windows Installer

  • How To use javebean tree in forms 6i

    Could any one send or refer me to use of javebean tree use in forms 6i i m new to releated topic

  • Great tip! A / V cable for iPod

    Just passing along a tip I got today from a friend. I have been looking for the cable to be able to get my iPod movies on my TV. There are a few cables out there, and they look like standard mini jack to Red/White/Yellow RCA. Well the ones for iPod s

  • XSQL and Clobs

    I have run into some trouble with retrieving Clob fields with XSQL, seems as though the resultset I am getting is a pointer to the data and not the data itself. This is what I am trying to do. 1. Query an Oracle 8i data base that contains multiple cl

  • Photoshop CS6 trigger to Upgrade Graphics Card?

    Photoshop CS6 beta release "the first version to integrate the company's GPU-accelerating Mercury Graphics Engine (MGE)".  Does this mean that I could expect speed benefits in Photoshop if I upgrade the NVIDIA 8800GT card in my early 2008 Mac Pro? I