How to solve javax.media.j3d.CapabilityNotSetException: Background: no capa

Hi
i am chnage Java 3d object loader applet background color for run time.
here i attached my coding.
error will be displayed like
javax.media.j3d.CapabilityNotSetException: Background: no capability to set color
pls help me, how to set runtime coor setting option.
regards,
M.Mathivanan

- I will say again. Please do not cross post. This is thread #3 for the exact same question. Keep all your questions regarding the same problem in the same thread. You will find the answer you need in the following thread:
http://forum.java.sun.com/thread.jspa?threadID=673593&tstart=0

Similar Messages

  • Creating a text with transparent background using javax.media.j3d.Raster

    Hi, I'm trying to display a text in Java3D using the Raster but I'm not sure to make the background of the text transparent. Does anyone have any ideas.
    Here's my code for creating the Raster image:
    private javax.media.j3d.Raster getRaster(String str, boolean rotate) {
    // Create an empty raster.
    javax.media.j3d.Raster raster = new javax.media.j3d.Raster();
    // Get a font metrics.
    Font font = new Font("Times", Font.PLAIN, 12);
    FontMetrics fm = getFontMetrics(font);
    // Calculate the raster size.
    int width = SwingUtilities.computeStringWidth(fm, str) + 6;
    int height = 18;
    // Create an BufferedImage.
    BufferedImage image = new BufferedImage(width,
    height,
    BufferedImage.TYPE_INT_BGR);
    // Draw the input string on the BufferedImage.
    Graphics2D g2d = (Graphics2D) image.getGraphics();
    g2d.setFont(font);
    g2d.setColor(Color.WHITE);
    g2d.drawString(str, 3, 14);
    // Set the BufferedImage to the raster.
    raster.setImage(new ImageComponent2D(ImageComponent2D.FORMAT_RGB, image));
    raster.setSize(width, height);
    raster.setType(javax.media.j3d.Raster.RASTER_COLOR);
    raster.setCapability(javax.media.j3d.Raster.ALLOW_IMAGE_WRITE);
    raster.setCapability(javax.media.j3d.Raster.ALLOW_SIZE_READ);
    return raster;
    Thank you for your help.

    Hi,
    If you create a new transparent imge you can put a color fill layer below the text layer and either turn off  the layer visiblity for the color fill layer (eye beside the color fill layer in the layers panel)
    or delete the color fill layer before saving the file as a transparent png.

  • Where is the javax.media.j3d

    Hi I install Java3d JDK 1.4.2 but i have only one jar file with com.sun... utility java 3d package what I must do to have package javax.media.j3d?And do I can use java 3d to create games?

    Hi I install Java3d JDK 1.4.2 but i have only one jar
    file with com.sun... utility java 3d package what I
    must do to have package javax.media.j3d?For me it was straight forward process of installing the complete J3D. Extract the files to YOUR_JDK_PATH/jre/lib/ext and/or tell java via the CLASSPATH variable to use the jar's.
    And do I can use java 3d to create games?Yes...if you put some brain and effort in it. There are several projects in the web, which care about game programming using J3D. Try to google for them.
    Hope this helps.
    Kai

  • Javax.media,j3d import problem

    Hi,
    I had one old project and have tried to run it today.
    I have downloaded jdse 1.5 and I have tried to compile with eclipse 3.1 but I can't import these classes, the errors are :
    Severity     Description     Resource     In Folder     Location     Creation Time
    2     The import javax.media cannot be resolved     Demoirb2000nonrealtime.java     RTEnvironment/Demo     line 15     8 de diciembre de 2005 10:49:38
    2     The import javax.vecmath cannot be resolved     Demoirb2000nonrealtime.java     RTEnvironment/Demo     line 16     8 de diciembre de 2005 10:49:38
    2     The import com.sun.j3d cannot be resolved     Receiver.java     RTEnvironment/Demo     line 4     8 de diciembre de 2005 10:39:33
    what can I do?

    try a search on google for javax.media and the others import I'm not sure but I think they are not standard java.

  • How to import javax.media.*

    i am doing project on audio ,video transmission over the LAN.
    after installing JMF1.2.1, when i run the program i am getting the error
    "D:\raghu\amp\audiolabreports\ampcom\AmpCom.java:3: package javax.media does not exist
    import javax.media.*;
    ^
    1 error"
    please help me out
    -raghnath.g

    Hi,
    You need to place jmf.jar in your classpath.
    -Amol

  • How to solve javax.servlet.jsp.JspException: duplicate Id for a component?

    Dear everyone,
    I have built some customized JSF components. In the taglib, there is attribute "id" for my components. There is no problem when the page is run, but when I click submit button, there are errors.
    javax.servlet.jsp.JspException: duplicate Id for a component form1:dojoComboBox1     at com.sun.faces.taglib.jsf_core.ViewTag.doAfterBody(ViewTag.java:191)     at _andychun._jspService(_andychun.java:190)     [andychun.jsp]     at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.1) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:598)     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:522)
    Please kindly help solve this problem. Thank you.
    Best Regards,
    David

    Alex,
    my guess is that because you copied content from the
    first page to the next, you created JSF components
    with the same ID. JSF components must have unique IDs
    though.
    FrankHello Frank,
    Thanks for your reply. The thing is in the first page I do not have much id's specified/defined. And in the second page what I did was to take out all id's to see if it was conflicting. When I tried it again I still got the error. So the id's are being generated automatically if seems.
    Also is it that JSF components should have unique id's for a particular page or all pages in the JSF application?
    Any other sugguestions. I hope you understand what I am saying. If you have any questions or uncertainties fell free to ask me.
    Thanks,
    Alex.

  • Re: How do solve volume adjust problem on background music with voice

    I have using Captivate 6,i have facing in adjust volume on  background music with voice when drag play bar and using backward,forward buttons in preview.

    Hey there,
    And welcome to Apple Discussions.
    If your iPod, is a 30 GB model, then it is a 5th generation iPod. This information can be found here: [Identifying iPod Models|http://support.apple.com/kb/HT1353]
    There are a few ways you could go about solving this issue. The first thing is to enable Sound Check on your iPod, which can be found under *Main Menu -> Settings -> Sound Check*. Next, be sure the option is also enabled in iTunes. The setting is in iTunes preferences Playback pane. Place a check next to the box for *Sound Check*.
    Another option is to adjust the overall volume of the song in iTunes, and then sync the updated changes to your iPod. To do this, locate the song(s) in iTunes, right->click and choose *Get Info* from the menu. From there, head over to the Options tab. Move the slider up and down depending on whether you want to bring the overall volume up or down and then hit Ok when you are finished. Lastly, sync your iPod to update the changes made to the altered songs. See if that helps.
    There are also excellent 3rd party applications that can adjust the songs overall volume. One can be found [HERE|http://mp3gain.sourceforge.net>.
    Hope this helps.
    B-rock

  • How to solve this problem javax.mail.AuthenticationFailedException

    i was used in this progrm my labtop means working correctly but instead of labtop i am using the desktop means following error is occuered can any one tell to me how to solve this problem.The erroe is **javax.mail.AuthenticationFailedException**
    The coding is as followes
    import javax.mail.*;
    import javax.mail.internet.*;
    import java.util.*;
    public class Main
    String d_email = "[email protected]",
    d_password = "inst9",
    d_host = "smtp.gmail.com",
    d_port = "465",
    m_to = "[email protected]",
    m_subject = "Testing",
    m_text = "Hey, this is the testing email.";
    public Main()
    Properties props = new Properties();
    props.put("mail.smtp.user", d_email);
    props.put("mail.smtp.host", d_host);
    props.put("mail.smtp.port", d_port);
    props.put("mail.smtp.starttls.enable","true");
    props.put("mail.smtp.auth", "true");
    //props.put("mail.smtp.debug", "true");
    props.put("mail.smtp.socketFactory.port", d_port);
    props.put("mail.smtp.socketFactory.class", "javax.net.ssl.SSLSocketFactory");
    props.put("mail.smtp.socketFactory.fallback", "false");
    SecurityManager security = System.getSecurityManager();
    try
    Authenticator auth = new SMTPAuthenticator();
    Session session = Session.getInstance(props, auth);
    //session.setDebug(true);
    MimeMessage msg = new MimeMessage(session);
    msg.setText(m_text);
    msg.setSubject(m_subject);
    msg.setFrom(new InternetAddress(d_email));
    msg.addRecipient(Message.RecipientType.TO, new InternetAddress(m_to));
    Transport.send(msg);
    catch (Exception mex)
    mex.printStackTrace();
    public static void main(String[] args)
    Main blah = new Main();
    private class SMTPAuthenticator extends javax.mail.Authenticator
    public PasswordAuthentication getPasswordAuthentication()
    return new PasswordAuthentication(d_email, d_password);
    }

    yes that not a my password ...but the following erroer is occured ...
    run-main:
    javax.mail.AuthenticationFailedException
    at javax.mail.Service.connect(Service.java:319)
    at javax.mail.Service.connect(Service.java:169)
    at javax.mail.Service.connect(Service.java:118)
    at javax.mail.Transport.send0(Transport.java:188)
    at javax.mail.Transport.send(Transport.java:118)
    at Main.<init>(Main.java:41)
    at Main.main(Main.java:51)
    BUILD SUCCESSFUL (total time: 3 seconds)
    I am using the netbeand 5.5

  • How to solve hp laser jet cp4525 showing magenta on the background

    Good day, does anybody no how to solve hp laser jet cp4525 showing magenta on the background. The responses will be appreciated
    Thanks.

    Make a copy of a document. Also a blank paper copy to see if it shows up then. 
    **Click the KUDOS star on the left to say 'Thanks'**
    Please mark a reply "ACCEPTED AS SOLUTION" if it solved your problem, so others can find it.

  • After installing Lion os I cannot see my desktop 1 nor can I see my open windows when I go to finder, I just get the grey/black background that comes with mission control. Any ideas as to how to solve this problem?

    The top picture is what my Desktop 1 looks like. And the picture below is what my desktop looks like after clicking mission control. Ive tried changing wallpapers, changing preferences, etc. and I still can't figure out what's wrong. As you can see, on mission control you can't see any of the open windows, or anything that I have placed on my desktop. Any ideas as to how to solve this issue?

    Hello cor-el, thanks for your reply. I changed my settings for downloads to desktop and it has appeared on there. When I double click I am asked which program I want to open file. I click firefox and another box "opening install" says I have chosen to open the file which is an application and do I want to save it. This is the only real option so I press save file. I get a box saying this is an executable file which may contain viruses - do you want to run. I press ok and the final box showing C drive file name and desktop appears stating application not found.
    This happens the same whenever I try to install.
    To my untrained eye the application is not being recognised as an application and I cannot work out how to get it to do that.
    My plugin is still showing as out of date.
    Is there anything you could suggest. Thanks for your time.

  • I stopped importing media so i could delete what i didn't want, how do you re start them in background tasks?

    so i could delete what i didn't want, how do you re start them in background tasks?

    First, I'd recommend you contact iAd support as they may be able to help resolve some of your issues.
    Regarding Blueprints vs. custom, you could start with a Blueprint, fill in every part you care about, ensure there are no validation errors reported by iAd Producer (Inspector sidebar), File > Convert to Normal Project, then delete any unused pages and banners.
    While I haven't used Workbench, in looking at the available ad types documented in the help (http://help.apple.com/iadworkbench/mac/2.0/#slvbb8575343), why not use the "Banner ad that plays a video with iTunes Store or App Store call to action" or "Banner ad that goes to iTunes Store or App Store product page"?

  • "package javax.media does not exist" error message. Help!

    May be this is a rookie problem, but I can't solve it by myself.
    I'm using JBuider X to develop a GUI, and need to capture an image, from a web cam or so, and to save it in DB.
    The problem is: I found some source codes wich are supposed to do this... but they references (imports) an javax.media class... and the JBuilder says that this class doesn't exists.
    Can anyone help me?
    Where can I get the class, and how I inform to JBuider where it's located?
    Thanks in advance.
    Ernesto Becker

    Project tab, "Build", Libraries -> import the JMF libraries. Something like that.

  • How to solve a problem related with implementing Inheritance?

    Hello,
    So i come on this way to ask for help about implementing Inheritance on my application. So the problem is:
    I am making a Application which i need to capture audio and that analyze that capture by Spectrum Analyzer, Volumes etc.
    And I will use several microphones in this application so i will use same code in capturing audio.
    I have a class called Application which has the GUI and the events, like button events and update the values in the GUI. In my first version of the Application i had everything here but i don´t like that and is not good for the performance so i want to divide the code by other classes. Thats why i am trying the Inheritance.
    So i created a class called Equipment which is the superclass and in this class will have the method captureAudio(), calculateRMSLevel(), sendOutPresenceUpdates() etc.. And i have 3 variables:
    public abstract class Equipment {
        public AudioFormat format;
        public TargetDataLine line;
        public Mixer mixer;
        public EventListenerList listenerList = new EventListenerList();
        public Equipment(AudioFormat format, TargetDataLine line, Mixer mixer){
            this.format = format;
            this.line = line;
            this.mixer = mixer;
        public AudioFormat getFormat() {
            return format;
        public void setFormat(AudioFormat format) {
            this.format = format;
        public TargetDataLine getLine() {
            return line;
        public void setLine(TargetDataLine line) {
            this.line = line;
        public Mixer getMixer() {
            return mixer;
        public void setMixer(Mixer mixer) {
            this.mixer = mixer;
         public int calculateRMSLevel(byte[] audioData){
         // audioData might be buffered data read from a data line
            long lSum = 0;
            for(int i=0; i<audioData.length; i++)
                lSum = lSum + audioData;
    double dAvg = lSum / audioData.length;
    double sumMeanSquare = 0d;
    for(int j=0; j<audioData.length; j++)
    sumMeanSquare = sumMeanSquare + Math.pow(audioData[j] - dAvg, 2d);
    double averageMeanSquare = sumMeanSquare / audioData.length;
    return (int)(Math.pow(averageMeanSquare,0.5d) + 0.5);
    public void sendOutPresenceUpdates(int FullJIDAndResource, String NewPresence) {
         Object[] listeners = listenerList.getListenerList();
         Integer inputValue = _FullJIDAndResource;
         String convertedValue = inputValue.toString();
    // Empty out the listener list
         // Each listener occupies two elements - the first is the listener class and the second is the listener instance
    for (int i=0; i < listeners.length; i+=2) {
              if (listeners[i]==CustomPresenceListener.class) {
                   ((CustomPresenceListener)listeners[i+1]).presenceEventOccurred(new CustomPresenceEvent(this, convertedValue, _NewPresence));
    public void listenForPresenceEvents(CustomPresenceListener _listener) {
              listenerList.add(CustomPresenceListener.class, _listener);
    public void removeEventListener(CustomPresenceListener _listener) {
              listenerList.remove(CustomPresenceListener.class, _listener);
    public void captureAudio(){
    And i have questions about the constructor, is right the constructor that i created in the superclass?
    So i create a subclass called Microphone1 and in this class i make override from the method captureAudio() from the superclass and here i create the thread for the capture.class Microphone1 extends Equipment{
    public Microphone1(AudioFormat format, TargetDataLine line, Mixer mixer){
    super(format,line,mixer);
    public void captureAudio(){
    try{
    format = getFormat();
    Mixer.Info[] mixerInfo =AudioSystem.getMixerInfo();
    //DataLine.info get the information about the line.
    DataLine.Info info = new DataLine.Info(TargetDataLine.class,format);
    Mixer mixer = AudioSystem.getMixer(mixerInfo[3]);
    // get the info from the desired line.
    line = (TargetDataLine)AudioSystem.getLine(info);
    //Get a TargetDataLine on the selected mixer.
    line = (TargetDataLine) mixer.getLine(info);
    line.open(format);
    line.start();
    CaptureThread captureThread = new CaptureThread();
    captureThread.start();
    } catch (Exception e) {
    System.out.println(e);
    System.exit(0);
    }//end catch
    But now i have a problem in the class Application, because i want to start the capture when i click in the button so i created the actionPerfomed and inside of this event i create this:Microphone1 m1 = new Microphone1(format,line,mixer);
    m1.captureAudio();
    But when i execute the application and click in the button appears this: java.lang.NullPointerException :/ and i don't know how to solve this.
    Any help? Where i am wrong?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    Hello Kayaman,
    Well thinking in that way is not good creating the Microphone1 object every time i click in the button.
    So i put e.printStackTrace in the catch block the show me this error:
    java.lang.NullPointerException
    at com.sun.media.sound.Toolkit.isFullySpecifiedAudioFormat(Toolkit.java:137)
    at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:98)
    at com.sun.media.sound.AbstractDataLine.open(AbstractDataLine.java:139)
    at App.Microphone1.captureAudio(Microphone1.java:42)
    at App.Application.startBtnActionPerformed(Application.java:529)
    at App.Application.access$000(Application.java:29)
    at App.Application$1.actionPerformed(Application.java:152)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6267)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
    at java.awt.Component.processEvent(Component.java:6032)
    at java.awt.Container.processEvent(Container.java:2041)
    at java.awt.Component.dispatchEventImpl(Component.java:4630)
    at java.awt.Container.dispatchEventImpl(Container.java:2099)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4577)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)
    at java.awt.Container.dispatchEventImpl(Container.java:2085)
    at java.awt.Window.dispatchEventImpl(Window.java:2478)
    at java.awt.Component.dispatchEvent(Component.java:4460)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
    at App.Microphone1.captureAudio(Microphone1.java:42):
    This error is about this line: line.open(format);at App.Application.startBtnActionPerformed(Application.java:529): m1.captureAudio();:/

  • In compileng time this class not found import javax.media.jai.JA

    Hi,
    I�m download
    jai_imageio-1_0_01-lib-windows-i586
    jai_imageio-1_0_01-lib-windows-i586-jdk
    jai_imageio-1_0_01-lib-windows-i586-jre
    jdk-1_5_0_02-windows-i586-p
    in compel time
    import com.sun.media.jai.codec.*;
    import javax.media.jai.JAI;
    The complier gave me error class not found
    How can i configured my system
    I have Windows XP
    [email protected]

    try compiling like this:
    java -cp "." myTest
    This is not compiling, here you execute the already
    compiled myTest.java file (or it should be already
    compiled). To compile you may want to use javac or any
    other available compiler.Oops, sorry, I didn't mean compiling.
    If you were able to compile ok, you can try running the program by using:
    java -cp "." myTest
    This usually will solve the problem when your program comples fine but can't find the class when you try to run it. It's almost like the compiler assumes to look in the current directory but the VM (java.exe) doesn't make this assumption.

  • Javax.media, installing

    Hi, I am trying to use:
    import javax.media.jai.PlanarImage;
    import javax.media.jai.Histogram;
    But I keep getting an error, how do i install them? I am assuming i have to download a new developers pack, and how do I install it under eclipse?
    Many thanks, Ron

    I have the same problem, can you help to solve it?
    I can't make work JMF in my linux box:
    I have added these lines to my .bashrc script:
    export JMFHOME=/usr/local/lib/JMF-2.1.1e
    export CLASSPATH=$JMFHOME/lib/jmf.jar
    export LD_LIBRARY_PATH=$JMFHOME/lib
    Additionally I have make ln -s /usr/local/lib/JMF-2.1.1/lib/jmf.jar in
    my /usr/local/lib/j2re1.4.2_01/lib/ext/ directory.
    And
    http://java.sun.com/products/java-media/jmf/2.1.1/jmfdiagnostics.html
    always say me:
    "JMF Version... 2.1.1e
    All Java Build
    Native Libraries Not Found"
    What are "Native Libraries"?
    Can you help me please?

Maybe you are looking for

  • Yellow screen on external TV Monitor via DVI-ADC Adaptor

    Hello, I am using a 2008 17" MacBook Pro with a DVI-ADC Adaptor in order too use an external monitor, however whenever I set it up the 2nd external monitor has a yellow tint all over the screen. Does anyone have any solutions to resolve this?

  • External HD not being recognized

    I'm running a Seagate Free Agent Go FW 250GB external HD to back my computer up. Only thing is it isn't being read by my Macbook Pro. The last time I was able to back up my computer was 30 JAN 2012. I'm connecting it to my computer via the two includ

  • Difference Between BAPI and RFM

    Dear Friends, I have seen a few thread explaining the difference between BAPI and RFM(Remote-enabled function Modules) from functional point of view. I know that there are cases when both are available in BOR. Both can be implement using Object Orien

  • Tune transfer

    ok, i know that "tune transfer for ipod" isn't a product of apple, but.. i bought this product which transfers songs from my ipod into itunes and it works pretty much fine, songs are being transferred onto my computer.. the problem is that i've just

  • Can't move all contacts from phone memory to sim i...

    Please i need help. I can't move all contacts from my Nokia 6600 phone memory to SIM or from SIM to phone memory at a time like i used to do with my former Nokia 6810. Does anybody know how to do this? Thanks. Darry.