How to get the silverish white color in Java

Hi
I want to know how to get the silver color in Java
I am currently using
R , G , B
setBackground(new color(255,255,255));
I am getting bright white color.
How do I get the polished white(silverish white color) color.
Thank You

RGB Color Chart...
http://www.htmlcenter.com/tutorials/tutorials.cfm/89/General/
perhaps new Color(223,223,255) ???

Similar Messages

  • How to get the default selection color from JTable

    Hi, there,
    I have a question for how to get the default selection color from JTable. I am currently implementing the customized table cell renderer, but I do want to set the selection color in the table exactly the same of default table cell renderer. The JTable.getSelectionBackgroup() did not works for me, it returned dark blue which made the text in the table unreadable. Anyone know how to get the window's default selection color?
    Thanks,
    -Jenny

    The windows default selection color is dark blue. Try selecting any text on this page. The difference is that the text gets changed to a white font so you can actually see the text.
    If you don't like the default colors that Java uses then use the UIManager to change the defaults. The following program shows all the properties controlled by the UIManager:
    http://www.discoverteenergy.com/files/ShowUIDefaults.java
    Any of the properties can be changed for the entire application by using:
    UIManager.put( "propertyName", value );

  • How to get the Swatch Options Color Type?

    How to get the Swatch Options Color Type name that is "Process Color" or "Spot Color" which shown in the Color Type via scripting..
    Thanks...

    Could you please provide any example for how to get the color type name that is process or spot. Thanks for looking into this.
    Advance thanks,
    Maria Prabudass

  • In OBIEE 11G, how to get the special parameter created by JAVA?

    Hi Experts,
    In OBIEE 11G, how to get the special parameter created by JAVA?
    For example:
    In JAVA , it has set one parameter named 'test'.
    So how to get the parameter in filter area in OBIEE?

    Hi Kobe,
    No P2 holds the parameter name like PresentationTable.ColumnName, in your form you may go for complete name or just column name and before submitting the form you can define the Action url.
    I would suggest to read section 6.3.2.1.
    ex:
    <SCRIPT LANGUAGE="JavaScript">
    changeAction(url) {
    var TestVar = form.inputbox.value;
    document.this_form.action="saw.dll?Go&Path=/Shared/Test/SB2&Action=Navigate&P0=1&P1=like&P2=Customers.Region&P3="+TestVar;
    </SCRIPT>
    </HEAD>
    <BODY>
    <FORM NAME="myform" ACTION="" METHOD="GET">Enter something in the box: <BR>
    <INPUT TYPE="text" NAME="inputbox" VALUE=""><P>
    <INPUT TYPE="button" NAME="button" Value="Click" onClick="changeAction(this.value)">
    </FORM>
    If helps pls mark.
    Edited by: veeravalli on Oct 24, 2012 10:25 AM

  • How to get the current GMT time in java

    Hi,
    How to get the current GMT time in java
    Thanks

    System.getCurrentTimeMillis() or new Date().
    [url http://www.javaworld.com/jw-12-2000/jw-1229-dates.html]Calculating Java dates: Take the time to learn how to create and use dates
    [url http://www.javaalmanac.com/egs/java.text/FormatDate.html]Formatting a Date Using a Custom Format

  • How to get the current function name in java

    How to get the current function name in java.
    In c it is done as
    printf("%s",__func__);
    Thanx in advance.

    j0o wrote:
    System.out.println("Class Name: " + new Exception().getStackTrace()[0].getClassName() +
    "/n Method Name : " + new Exception().getStackTrace()[0].getMethodName() +
    "/n Line number : " + new Exception().getStackTrace()[0].getLineNumber());
    I pointed the OP at this approach yesterday in one of his multi-posts. I still have not been given my Dukes!

  • How to  get the profile object in simple java class  (Property accessor)

    Hi All,
    Please guide me how to get the profile object in simple java class (Property accessor) which is extending the RepositoryPropertyDescriptor.
    I have one requirement where i need the profile object i.e i have store id which is tied to profile .so i need the profile object in the property accessor of the SKU item descriptor property, which is extending RepositoryPropertyDescriptor.
    a.I dont have request object also to do request.resolvename.
    b.It is not a component to create setter and getter.It is simple java class which is extending the RepositoryPropertyDescriptor.
    Advance Thanks.

    Iam afraid you might run into synchronization issues with it. You are trying to get/set value of property of a sku repository item that is shared across various profiles.
    Say one profile A called setPropertyValue("propertyName", value).Now another profile B accesses
    getPropertyValue() {
    super.getPropertyValue() // Chance of getting value set by Profile A.
    // Perform logic
    There is a chance that profile B getting the value set by Profile A and hence inconsistency.
    How about doing this way??
    Create PropertyDescriptor in Profile (i.e user item descriptor), pass the attribute CustomCatalogTools in userProfile.xml to that property.
    <attribute name="catalogTools" value="atg.commerce.catalog.CustomCatalogTools"/>
    getPropertyValue()
    //You have Profile item descriptor and also storeId property value.
    // Use CustomCatalogTools.findSku();
    // Use storeId, profile repository item, sku repository item to perform the logic
    Here user itemdescriptor getPropertyValue/setPropertyValue is always called by same profile and there is consistency.
    -karthik

  • How to get the Seperation setup color plates count in Illustrator 10 SDK?

    Hi All,
    Im using Microsoft VC++6.0 & Illustrator 10 SDK.
    How can i get access to "Seperation setup " property of the document.
    Actually i need to get the number of color plates inside the separation setup.
    Any sample code please.
    Thanks in advance
    Regards
    myRiaz

    It sounds like you need to figure out which part of the API deals with colour separation. It could be AIDocument.h or it could be AIColor.h. I'm afraid you'll just have to check the headers until you find something that looks like you want. You could also try searching the API for a piece of text that you'd expect to find associated with the values you're trying to pull -- that might point you in the right direction.

  • How to get the Current Date in webdynpro java

    Hi Experts,
                 In my project i have two date input fields called
                        1)Start Date
                      2)End Date   
    and one Absence type input field is there. The user wants to set the start Date ,End date and absence type.
    How to get the user set values in my project.i.e how to get the user inputs and the started date must be current date of the system and end date must be after the 3 months.
    Can any body send code regarding this.
    Thanks in advance.
    Regards,
    Venkat.
    Edited by: Venkat5939 on Jan 11, 2011 4:46 PM

    Hello Venkat,
    Current Date:
    Date date = new Date(System.currentTimeMillis());
    For getting the date after three months refer the following threads:
    Set date in a date field
    Date Function
    date format
    Hope it helps.
    Regards
    Nizamudeen SM

  • How to get the system32 folder path in java?

    how to get the system32 folder path in windows using java code?

    Zstar Electronic Co.Ltd, Wholesaler of fire cards for DS/NDSL/NDSi, Provide R4, R4i, DStt, iEDGE, AK2i,M3,M3i,N5
    www.zstar.hk

  • How to get the  name of color from the Color Object??

    hi all,
    i want to get the color name from the Color Object i.e say if the Color object is something like
    c=new Color(128,128,128);
    I should be a able to say this object is of gray color dynamically
    Can anyone help???

    You can't do this. There is no label for a color - what is 0x439803 called? 'Mud?' 'Rustic sludge?' 'Poo brown?' - and then that's just English, it might need to be 'Brun de Kaka' or something.
    If you want to check against a certain predefined color you could do the following,
    if (Color.GRAY.equals(myColor))Otherwise you'll have to write your own code to label colors.

  • How to get the foreground/background color in photoshop.

    I want to get the foreground or background color at runtime ( by any action ) in photoshop.
    What steps should I follow.

    For example here is a script I use within Photoshop Actions to save and restore the users foreground and background colors so the action can mess with Photoshops foreground and background colors during its processing.
    SaveAndRestoreColors.jsx
    /* ======================================================================================
    // 2009  John J. McAssey (JJMack)  http://www.mouseprints.net/
    // This script is supplied as is. It is provided as freeware.
    // The author accepts no liability for any problems arising from its use.
    // This script is designed to be used by a Photoshop Action twice
    // A good pratice to use when creating an actions that use this scipt is for the action
    // not to do a save or play some other action between its two useages of this Script.
    // The first time this script is used by an action Photoshops Current Forground
    // and Background Colors are saved into the document's meta-data Info Instructions field.
    // The second time this script used by the action the script retreives what was
    // saved in the meta-data during the first usage and these colors are set.
    // and the saved data is removed from the document's meta-data Info Instructions field.
    // ===================================================================================== */
    <javascriptresource>
    <about>$$$/JavaScripts/SaveAndRestoreColors/About=JJMack's SaveAndRestoreColors.^r^rCopyright 2009 Mouseprints.^r^rRun twice script utility for action.^rNOTE:Don't play other actions between runs!^r^rFirst Run records Photoshops foreground and background swatch colors.^rSecond Run restores the recorded colors and removes the recording.</about>
    <category>JJMack's Action Run Twice Utility</category>
    </javascriptresource>
    if (app.documents.length > 0) {
    if (app.activeDocument.info.instructions.indexOf("<Colorf>") == -1 ){ // no footprint fisrt useage
    //alert("first");
    // Retreive Document information for Foot Print
    saveforeColor = new SolidColor;
    saveforeColor.rgb.red = app.foregroundColor.rgb.red;
    saveforeColor.rgb.green = app.foregroundColor.rgb.green;
    saveforeColor.rgb.blue = app.foregroundColor.rgb.blue;
    savebackColor = new SolidColor;
    savebackColor.rgb.red = app.backgroundColor.rgb.red;
    savebackColor.rgb.green = app.backgroundColor.rgb.green;
    savebackColor.rgb.blue = app.backgroundColor.rgb.blue;
    // put footprint in metadata info instructions
    app.activeDocument.info.instructions = app.activeDocument.info.instructions + "<Colorf>" + saveforeColor.rgb.red + "," + saveforeColor.rgb.green + "," + saveforeColor.rgb.blue + "</Colorf>" + "<Colorb>" + savebackColor.rgb.red + "," + savebackColor.rgb.green + "," + savebackColor.rgb.blue + "</Colorb>";
    //alert( "Saved ="  + "<Colorf>" + saveforeColor.rgb.red + "," + saveforeColor.rgb.green + "," + saveforeColor.rgb.blue + "</Colorf>" + "<Colorb>" + savebackColor.rgb.red + "," + savebackColor.rgb.green + "," + savebackColor.rgb.blue + "</Colorb>");
    else {
    //alert("second");
    // Retreive saved information
    colorfOffset = app.activeDocument.info.instructions.indexOf("<Colorf>") + "<Colorf>".length;
    colorfLength = app.activeDocument.info.instructions.indexOf("</Colorf") -colorfOffset;
    saveforeColor = app.activeDocument.info.instructions.substr(colorfOffset, colorfLength);
    colorbOffset = app.activeDocument.info.instructions.indexOf("<Colorb>") + "<Colorb>".length;
    colorbLength = app.activeDocument.info.instructions.indexOf("</Colorb") -colorbOffset;
    savebackColor = app.activeDocument.info.instructions.substr(colorbOffset, colorbLength);
    //alert("Colorf = " + saveforeColor + " Colorb = " + savebackColor );
    // Restore Colors
    app.foregroundColor.rgb.red = saveforeColor.substr(0,saveforeColor.indexOf(","));
    saveforeColor = saveforeColor.substr(saveforeColor.indexOf(",") + 1,saveforeColor.length);
    app.foregroundColor.rgb.green = saveforeColor.substr(0,saveforeColor.indexOf(","));
    saveforeColor = saveforeColor.substr(saveforeColor.indexOf(",") + 1,saveforeColor.length);
    app.foregroundColor.rgb.blue = saveforeColor ;
    app.backgroundColor.rgb.red = savebackColor.substr(0,savebackColor.indexOf(","));
    savebackColor = savebackColor.substr((savebackColor.indexOf(",") + 1),savebackColor.length);
    app.backgroundColor.rgb.green = savebackColor.substr(0,savebackColor.indexOf(","));
    savebackColor = savebackColor.substr(savebackColor.indexOf(",") + 1,savebackColor.length);
    app.backgroundColor.rgb.blue = savebackColor ;
    // Remove footprint from metadata info instructions
    before = app.activeDocument.info.instructions.substr(0,app.activeDocument.info.instructions.indexO f("<Colorf>"));
    afterOffset = app.activeDocument.info.instructions.indexOf("</Colorb>") + "</Colorb>".length;
    after = app.activeDocument.info.instructions.substr(afterOffset, app.activeDocument.info.instructions.length - afterOffset);
    //alert ("before = " + before + " after = " + after);
    app.activeDocument.info.instructions = before + after;
    else { alert("You must have at least one open document to run this script!"); }

  • How to get the hour:minuts:seconds using java

    I have table xydata
    here i get the gsTime like this 2010-04-21 10:58:40
    the above time i want to get only 10:58:40
    how to write the java for this
    please help me
    Thanks in Advance

    Problem of this sort cry out for using regular expressions. It is what they were invented for. If the OP wanted the whole date parsed into a java.util.Date then it would be a different matter and SimpleDateFormat would be the way to go but extracting part of a string is what regular expressions are best at.
    In this case, even a regular expression approach is far too complex. Which of the following do you consider the most appropriate ?
    import java.text.SimpleDateFormat;
    import java.util.Date;
    import java.util.regex.Matcher;
    import java.util.regex.Pattern;
    public class Sabre20100508
        public static void main(String[] args) throws Exception
            String[] lines =
                "2010-04-21 11:01:35",
                "2010-04-21 11:01:58",
                "2010-04-21 11:02:21",
                "2010-04-21 11:02:42",
                "2010-04-21 11:03:28",
                "2010-04-21 11:03:51"
                Pattern p = Pattern.compile("(?<= )\\d{2}:\\d{2}:\\d{2}");
                System.out.println("Method 1 :-");
                for (String line : lines)
                    Matcher m = p.matcher(line);
                    if (m.find())
                        System.out.printf("    [%s]\n", m.group());
                Pattern p = Pattern.compile("\\d{4}-\\d{2}-\\d{2} (\\d{2}:\\d{2}:\\d{2})");
                System.out.println("Method 2 :-");
                for (String line : lines)
                    Matcher m = p.matcher(line);
                    if (m.matches())
                        System.out.printf("    [%s]\n", m.group(1));
                System.out.println("Method 3 :-");
                for (String line : lines)
                    String[] splitLIne = line.split(" ", 2);
                    System.out.printf("    [%s]\n", splitLIne[1]);
                System.out.println("Method 4 :-");
                for (String line : lines)
                    int index = line.lastIndexOf(" ");
                    System.out.printf("    [%s]\n", line.substring(index + 1));
                System.out.println("Method 5 :-");
                SimpleDateFormat parser = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
                SimpleDateFormat formatter = new SimpleDateFormat("HH:mm:ss");
                for (String line : lines)
                    Date date = parser.parse(line);
                    System.out.printf("    [%s]\n", formatter.format(date));
                System.out.println("Method 6 :-");
                for (String line : lines)
                    System.out.printf("    [%s]\n", line.replaceAll("[^ ]* ", ""));
    }My vote goes to method 4!

  • How to get the page break preview in java

    I have an in house report building utility using gridbaglayouts. My reports are coming pretty good but i am unable switch the grids page wise. I tried using the graphics but failed as it cuts the grid in between. The grid bag layout does not return and size(height and width) for the grids. so theoption of getting the heights of grids will not work. Please give me the solution

    j0o wrote:
    System.out.println("Class Name: " + new Exception().getStackTrace()[0].getClassName() +
    "/n Method Name : " + new Exception().getStackTrace()[0].getMethodName() +
    "/n Line number : " + new Exception().getStackTrace()[0].getLineNumber());
    I pointed the OP at this approach yesterday in one of his multi-posts. I still have not been given my Dukes!

  • How to get the owning bean given a java object

    Hi, is there any way - for a just-created bean instance - to know on behalf of which bean this object has been created ?
    In other words, going back from the java object to the bean symbolic name, as described in a faces-config managed-bean chunk (just the opposite of resolveVariable) ?

    You want to get the definied managed bean name inside the backing bean?
    If so, call this inside the backing bean: private String getManagedBeanName() {
        String managedBeanName = null;
        HttpServletRequest request =
            (HttpServletRequest) FacesContext
                .getCurrentInstance()
                    .getExternalContext()
                        .getRequest();
        // Lookup bean in request scope.
        Enumeration requestAttributeNames = request.getAttributeNames();
        while (requestAttributeNames.hasMoreElements()) {
            String requestAttribute = (String) requestAttributeNames.nextElement();
            Object object = request.getAttribute(requestAttribute);
            if (this.equals(object)) {
                managedBeanName = requestAttribute;
                break;
        if (managedBeanName == null) {
            // Bean is not in the request scope. Lookup it in session scope.
            Enumeration sessionAttributeNames = request.getSession().getAttributeNames();
            while (sessionAttributeNames.hasMoreElements()) {
                String sessionAttribute = (String) sessionAttributeNames.nextElement();
                Object object = request.getSession().getAttribute(sessionAttribute);
                if (this.equals(object)) {
                    managedBeanName = sessionAttribute;
                    break;
        return managedBeanName;
    }

Maybe you are looking for