Help needed to understand this problem

Hello Guys,
can some one take a look and let me know that the following code segment should do what it seems to be doing?
StyledDocument doc=(StyledDocument)editor.getDocument();
MutableAttributeSet attr=new SimpleAttributeSet();
StyleConstants.setFontFamily(attr,fontFamily);
switch (fontStyle){
case 1:
StyleConstants.setBold(attr,false);
break;
case 2:
StyleConstants.setItalic(attr,false);
break;
StyleConstants.setFontSize(attr,fontSize);
doc.setCharacterAttributes(0,doc.getLength(),attr,true);
editor.setDocument(doc);
I am trying to change font properties at the runtime in a JTextPane.which has a file loaded into it.Once I click a button the above changes should apply,,but they don't
Thanks

Nevermind..I figured it out...:-)

Similar Messages

  • Help needed in understanding this question, please.

    Here is the question:
    What is the number displayed when the following program is compiled and run.
    class test {
        public static void main(String args[]) {
            test test1 = new test();
                System.out.println(test1.xyz(100));   
        public int xyz(int num) {
            if(num == 1) return 1;
            else return(xyz(num-1) + num);
    Answer= 5050.
    I'll be honest I am lost as to what happens in this code. Any help in explaining what happens in the code would be gratefully received, thanks, Dave.

    public int xyz(int num) {
    if(num == 1) return 1;
    else return(xyz(num-1) + num);
    it's called recursion, the method calls itself
    xyz(100) returns
    xyz(99)+100 which returns
    xyz(98)+99 which returns
    xyz(97)+98 which returns
    xyz(99)+100 which returns
    until you get to xyz(1) which returns 1
    so starting from the end of the recursion you get
    (for num = 2): 1+2
    (for num = 3): 3+3
    (for num = 4): 6+4
    (for num = 5): 10+5
    (for num = 100): 4950+100

  • What  do you need to understand this problem

    other than simple e-mail I can not  download any site even snow/safari/can not find pdf page to get rid of the pdf or change.

    Please explain the issue in detail. What are you attempting to do? What computer? What operating system?

  • Who can understand this problem..im confused pls help me!!!

    first i have to say i dont no much about troubleshooting or software side of computers.so pls help me to find me an answer for my problem. i cant get any search results ,when i typed something and cliked search it comes with an error message.but when i click on any news or any thing on yahoo page ,it comes up with out any errors(my home page is yahoo )and also i can acssess to my email also.this problem began 4 , 5 months back.funny thing some times i can search any thing without errors.but in next time it goes totaly wrong with error masseges. i cant understand this problem.it makes me sick.pls anyone can help me?another thing im using IE and FIRE FOX .today i found another thing.when i type something on ask search bar it came up with search results but when i typed same thing on google search bar it came up with error message..i'm really confused with this problem.pls pls help me :(

    Do a malware check with some malware scanning programs.<br />
    You need to scan with all programs because each program detects different malware.<br />
    Make sure that you update each program to get the latest version of their databases before doing a scan.<br />
    * http://www.malwarebytes.org/mbam.php - Malwarebytes' Anti-Malware
    * http://www.superantispyware.com/ - SuperAntispyware
    * http://www.microsoft.com/windows/products/winfamily/defender/default.mspx - Windows Defender: Home Page
    * http://www.safer-networking.org/en/index.html - Spybot Search & Destroy
    * http://www.lavasoft.com/products/ad_aware_free.php - Ad-Aware Free
    See also:
    * "Spyware on Windows": http://kb.mozillazine.org/Popups_not_blocked
    * [[Searches are redirected to another site]]

  • We have 'CS6' version of Adobe. We are facing a problem with 'Acrobat Pro'. Every month that is stop working and everytime need to install. Kindly help us regarding solving this problem...

    We have 'CS6' version of Adobe. We are facing a problem with 'Acrobat Pro'. Every month that is stop working and everytime need to install. Kindly help us regarding solving this problem...

    Your Acrobat is running in Trial Mode.  Try this KB: Creative Cloud applications unexpectedly revert to trial mode | CS6, CCM
    If it doesn't work you need to contact Adobe Support for assistance.

  • Unable to install the GEAR driver set at this time.The GEARAspiWDM service used bz the GEAR driver set is scheduled to be deleted during the next system reboot.Please reboot the system and run iTunes again.help me..I understand this problem..thanks

    Unable to install the GEAR driver set at this time.The GEARAspiWDM service used bz the GEAR driver set is scheduled to be deleted during the next system reboot.Please reboot the system and run iTunes again.help me..I understand this problem..thanks

    Hi there, i had the exact same problem and posted a thread a few above yours, and these forums wasnt much help nobody replied, so i did a bit of research and followed all the intructions on this site: http://www.gearsoftware.com/cfknowledgebase/articledisplay.cfm?articleid=296
    If you follow the steps very carefully and do as each says, this will solve your problem.. Now i am very happy i can actually install iTunes and use it for my iPod.
    Remember to be carefully with the steps as the things you will be deleting are very important to your comp.
    Hope this helps.
      Windows XP  

  • Adobe Creative Cloud is needed to resolve this problem. However, it is missing or damaged

    Creative Cloud will not run without throwing up a window "Adobe Creative Cloud is needed to resolve this problem. However, it is missing or damaged. Please download and install a new copy of the Creative Cloud". I download the app and run the installer, and it simply throws up the same window over again... "Adobe Creative Cloud is needed to resolve this problem. However, it is missing or damaged. Please download and install a new copy of the Creative Cloud". I'm stuck in a loop! Can someone help me urgently please? I'm on system 10.9.5

    Hi tiff_meek,
    You can try the steps:
    For Mac
    Go to Applications-->Utilities-->Adobe Installers.
    Uninstall Adobe Creative Cloud.
    ** If it says application is running in the background then open Activity Monitor and close the process of Creative cloud.
    Once the creative cloud is uninstalled then follow the below mentioned steps:
    Please go to Library
        1. Click on Finder then Click on Go and Go to folder
        2. Type /Library and click on Go
        3. Go to Application Support and Adobe and then delete OOBE folder.
        4. Redo Step 1
        5. Type ~/Library and click on Go
        6. Go to Application Support and Adobe and then delete OOBE folder.
        7. Go to https://creative.adobe.com/products/creative-cloud?promoid=KLYVF
    Download Adobe Creative cloud, Install it.
    If the above steps do not work. Try enabling root user account and then try to open Adobe Creative cloud.
    Enable root user: Enabling and using the "root" user in Mac OS X
    Thanks,
    Nikhil Gupta

  • I have problem with account that i can't make update or buy from app store There is massage appear in my payment page that i must contact with i tunes support to complete this transaction Please help me to fixe this problem as soon possible Hany hassan 00

    I have problem with account that i can't make update or buy from app store
    There is massage appear in my payment page that i must contact with i tunes support to complete this transaction
    Please help me to fixe this problem as soon possible
    Hany hassan
    0096597617317
    0096596677186
    Thank you

    You need to Contact iTunes Support...
    Apple  Support  iTunes Store  Contact Us

  • Hi, when ever I'm using 3G, on my Iphone4 sim stops working and Network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem.

    Hi, when ever I'm using 3G, on my Iphone4 sim stops working and network is lost, this started after I updated my phone with  6.0.1(10A523)version. Please help how to solve this problem. Thanks.

    Photos/videos in the Camera Roll are not synced. Photos/videos in the Camera Roll are not touched with the iTunes sync process. Photos/videos in the Camera Roll can be imported by your computer which is not handled by iTunes. Most importing software includes an option to delete the photos/videos from the Camera Roll after the import process is complete. If is my understanding that some Windows import software supports importing photos from the Camera Roll, but not videos. Regardless, the import software should not delete the photos/videos from the Camera Roll unless you set the app to do so.
    Photos/videos in the Camera Roll are included with your iPhone's backup. If you synced your iPhone with iTunes before the videos on the Camera Roll went missing and you haven't synced your iPhone with iTunes since they went missing, you can try restoring the iPhone with iTunes from the iPhone's backup. Don't sync the iPhone with iTunes again and decline the prompt to update the iPhone's backup after selecting Restore.

  • Left outer join VS Is NULL .. Please help me to understand this.

    Hi Experts,
    I have a requirement to use Leftouter join on a column. But unfortunately i couldnt implement this in OBIEE. so instead iam using = and is NULL condition. kindly help me to understand this or give me a solution.
    Advance Thanks
    I am pasting the query here. look at the last line of the query there i want to modify.
    select Targ.organization_id,Targ.cycle_count_header_name,Targ.cycle_count_header_id,Targ.cc_class_name
    ,Targ.total_cycle_count_per_month,NVL(Act.Actual_count,0)actual_count,targ.month_year,Act.count_stat,targ.year count_date_current,length(act.count_status) count_status,nvl(length(act.count_status),0)
    from
    (select
      Dim_date.Year,
    Dim_date.month_year,
    target.organization_id,
                             target.cycle_count_header_name,
                             target.cycle_count_header_id,
                             target.abc_class_id,
                             target.CC_class_name,
                            target.inventory_item_id_count,
                          target.cycle_count_per_year,
                            target.total_cycle_count_per_year,
                  target.total_cycle_count_per_month                       
    from
    (SELECT DISTINCT
                   TO_NUMBER (TO_CHAR (count_date_current, 'yyyy'), '9999') Year,
                    TO_CHAR (count_date_current, 'MON-YYYY') month_year
              FROM mtl_cycle_count_entries_v)Dim_date,
    (SELECT mth.organization_id,
                             mth.cycle_count_header_name,
                             mth.cycle_count_header_id,
                             mtc.abc_class_id,
                             mtc.CC_class_name,
                             COUNT (mti.inventory_item_id) inventory_item_id_count,
                             MIN (mtc.num_counts_per_year) cycle_count_per_year,
                             COUNT (mti.inventory_item_id)
                             * MIN (mtc.num_counts_per_year)
                                total_cycle_count_per_year,
                             ROUND (
                                (COUNT (mti.inventory_item_id)
                                 * MIN (mtc.num_counts_per_year))
                                / 12)
                                total_cycle_count_per_month,
                                TO_NUMBER (TO_CHAR (mth.creation_date, 'yyyy'), '9999') Year
                        FROM mtl_cycle_count_headers_v mth,
                             mtl_cycle_count_items_v mti,
                             mtl_cycle_count_classes_v mtc
                       WHERE mth.cycle_count_header_id = mti.cycle_count_header_id
                             AND mth.cycle_count_header_id = mtc.cycle_count_header_id
                             AND mth.organization_id = mtc.organization_id
                             AND mtc.abc_class_id = mti.abc_class_id
                              GROUP BY mth.organization_id,
                             mth.cycle_count_header_id,
                             mth.cycle_count_header_name,
                             mtc.abc_class_id,
                             mtc.CC_class_name,
                             TO_NUMBER (TO_CHAR (mth.creation_date, 'yyyy'), '9999')
                             ) Target
                                    where dim_date.Year=Target.Year) Targ,
                                  (SELECT --TRUNC (count_date_current) count_date_current,
                             TO_CHAR (count_date_current, 'MON-YYYY') Month_year,
                             abc_class_name,
                             count_status count_stat,
                             organization_id,
                             cycle_count_header_id,
                             count_status,
                             SUM (NUMBER_OF_COUNTS) Actual_count
                        FROM MTL_CYCLE_COUNT_ENTRIES_V
                    GROUP BY organization_id,
                             --TRUNC (count_date_current),
                             cycle_count_header_id,
                             TO_CHAR (count_date_current, 'MON-YYYY'),
                             abc_class_name,
                             count_status)Act
                           WHERE act.cycle_count_header_id(+) = targ.cycle_count_header_id
                   AND act.organization_id(+) = targ.organization_id
                   AND act.abc_class_name(+) = targ.cc_class_name
                    AND act.Month_year(+)=targ.month_year
                    AND targ.organization_id=254
                            AND targ.Cycle_count_header_id=3026
                             AND targ.CC_CLASS_NAME= 'A PARTS'
                             and act.count_status (+)='Rejected'I need to replace the final line act.count_status(+)='Rejected' with
    (act.count_status='Rejected' and act.count_status is NULL)But i am getting difference in data. what might be the reason?.. I am a naive user to oracle. Kindly help me and any help will be appreciated.
    Thanks alot.

    Data set for both i am enclosing here. Kindly have a look in to that.
    254     OPSCAST0909     3026     A PARTS     7     1     Dec-09     Rejected     2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Feb-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Sep-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Jul-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     May-09          2009          Data Set for outer join          
    254     OPSCAST0909     3026     A PARTS     7     0     Oct-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Jun-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Jan-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Nov-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Apr-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Aug-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Mar-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     1     Dec-09     Rejected     2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Feb-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Jul-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     May-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Jun-09          2009          Data set of IS NULL          
    254     OPSCAST0909     3026     A PARTS     7     0     Jan-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Apr-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Aug-09          2009                    
    254     OPSCAST0909     3026     A PARTS     7     0     Mar-09          2009                    

  • Is there anyone there? I hope there is someone who can you understand this problem and have the common sense to respond?  I open gmail. I want to save an email to one of my folders. I position my cursor over the appropriate Folder icon or by choice, to th

    Is there anyone there? I hope there is someone who can you understand this problem and have the common sense to respond?
    I open gmail. I want to save an email to one of my folders.
    I position my cursor over the appropriate Folder icon or by choice, to the Trash.
    The friendly finger pointing cursor icon changes to an arrow icon.
    The hand icon allows me flawless access to opening and/or moving emails.
    The arrow, however does not open the link.
    On the Google menu bar the cursor hand with finger opens the links to Everett (my name), Search, Images, Maps and Play.
    When I attempt to open the remaining links in the menu bar (YouTube, News, Gmail, Drive, Calendar and More) the arrow icon replaces the hand. The arrow icon does not work. It will not activate these links.  Nor does it open email messages in the Inbox.
    Usually I reset, even reboot Safire and sometimes the problem goes away, then reappears.
    Can you imagine if this condition should it happen to a tech savvy Google Support person? Perhaps one can share and make my problem go away.
    I am considering dropping Google as my mail source. Unfortunate!
    Everett Halvorsen
    [email protected]
    718.490.3824

    I have uninstalled my Access Connection, but this problem seems to persist. IBM technician have changed the wireless card of my T60, the first few days after it was changed was very fine, no problem at all. About a week later, the problem occured again, and it happened quite frequently after that occurence. Now i really have no idea what is the cause and how to solve it. Will be greatful if there is anyone that can help me.

  • I desperately need to solve this problem even geeks on call could not

    I desperately need to solve this problem
    Posted: May 17, 2006 5:29 PM Reply Email
    How to Connecti computers over the internet using IP addresses
    Posted: Mar 8, 2006 7:18 PM
    Reply Email
    No one has been able to help me solve this problem even geeks on call
    So please out there give me some good advice. This feels like a level 5
    I have three computers at three different locations. The first one is a emac at my office running classic 9.2. The second location is a power book g4 running 10.4.5. at my home. The third is a power book g3 running OS 9.2.2at a third location.
    What I am trying to do is to access my computer at my office from the other two locations. My office has two computers that are on a network and talk to each other. They are both EMAC"S. They are connected by a ethernet network which is connected to a DSL modem which keeps me on the Internet all the time.
    At the other two locations I have direcway satellite which is broadband which also stays on all the time on the internet.
    I need to be able to access a data base on my main computer at my office and run the program which is an Omnis 7 program. I have multi user capabilities for this program, so that all the computers can access the data files at the same time and reqad and write.
    So this is my dileema.
    Any help would be greatly appreciated
    powerbook g3,emac Mac OS 9.2.x also 9.2 os, and 9.22 o.s.and 10.4
    eww
    Posts: 2,224
    Registered: Jul 28, 2000
    New! Re: I desperately need to solve this problem
    Posted: May 17, 2006 6:08 PM in response to: drpresseye

    well, at any or all of the locations you may need to open up the ports through your routers to allow ARD access.
    Also, I'm wondering if you are experiencing problems between using old and new versions of remote desktop.
    In any case, when you say you have multi-user capabilities, to me that implies that from location 2 and 3 you want to open the database file directly, not open it within an RDC session on a machine at location 1. That will be a different issue. Now you are talking about file shares over TCP/IP.

  • When I tried to open PS CC2014, it flashed a bit then quit, same with DW and INDD ... I also got this error message: Adobe creative cloud is needed to resolve this problem. However, it is missing or damaged. Please download and install a new copy of the C

    This morning when I tried to open my CC2014 Photoshop, it started to open, then quit suddenly. Same with Dreamweaver and InDesign. I am a professional and do not have the time to screw around with this. When I tried to run CC app, I get an error that says "Adobe creative cloud is needed to resolve this problem. However, it is missing or damaged. Please download and install a new copy of the Creative Cloud from 'http://www.adobe.com/go/adobecreativecloudapp'." I did so and tried to run the app and got the same error. I tried the cleaner and it removed all of my apps, then I tried to install again, and got the same error. I am getting desperate now, I have clients waiting for their projects. I need help, please.

    Allisonf55952352 have you utilized the steps listed in Error: "Failed to install" | Creative Cloud Desktop to resolve the current error?  If not do you have any questions regarding the steps listed with the document?

  • My iphone 3gs is upgraded to ios 6.1.3 from ios 5.0.1 then it continues to shutting down then turning on i think that ios 6 is cannot carry by my iphone help me to solve this problem tnx

    my iphone 3gs is upgraded to ios 6.1.3 from ios 5.0.1 then it continues to shutting down then turning on i think that ios 6 is cannot carry by my iphone help me to solve this problem tnx

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...  Be sure to Follow ALL the Steps...
    Pay particular attention to Steps 3 and 4.
    When prompted... Choose Restore as New ( not from backup.)

  • I have updated new apple Iphone5 virsion which do not allowed sim card purchased in India, help me to solved this problem and I can enjoy my trip in India

    I am blocked, as I have updated new apple virsion, which do not allowed sim card purchased in India, at present I am in India
    and I want to use my phone using by purchase local sim card, please help me to solve this problem...Jayendrabhai Patel

    YOU will need to contact the carrier to whom the phone is locked.  YOU will need to see IF that carrier offers unlocking and IF you qualify.  This has nothing to do with Apple or this forum.
    Best,
    GDG

Maybe you are looking for

  • Logo appearing in print preview but not in print for Xerox Workcentre M118

    Hello experts, I am not able to print logo(in .bmp) format in Xerox Workcentre M118 PCL 6 printer. It is displaying accurately in print preview. While taking print out only grey background is coming, no trace of logo. Can anyone suggest, what are the

  • Digital signature stopped working in Acrobat Pro 9

    My digital id functionality in signing PDFs has suddenly stopped working. I've tried using it with multiple documents and none are working. I tried to create a new digital id, but that doesn't work either. Here's the error message I'm getting: (pleas

  • EBS in Solaris 10 X64

    Hi everybody. I have a licensing doubt. Sorry if this kind of question is misplaced... I have a running EBS 7.4 software server in a Sun Fire X2200M2 Solaris 10 8/07 I know that the Console Server (SUNWebsg) works in Solaris 10 SPARC but not in Solar

  • Report designer Query Transport issue!

    Hello ALL, Iu2019ve created a formatted report in Report designer the basis of which is a query developed in Query designer. Now the issue is Iu2019ve captured the query developed in Query designer by going to RSA1Transport connectionQuery Elements

  • Error: Oracle Forms Designer has stopped working

    I have read a lot of different responses regarding this and related issues but none of the answers seem to be relative to my specific problem. Here is what I have done so far: a. I just finished loading Oracle 11g 64x enterprise on my laptop running