Problem in my StyledDocument...urgent Pls
Hai,
I have a JFrame in which there is a toolbar and a tabbedPane containing 6 panels.Some panels have JTextPane in it.
The user may select any of the JTextPane and change its font ,style etc..
The toolbar contain buttons for Bold,Italics,color,etc.
First of all I have to detect the JTextPane in which the user make some changes.I did this with the help of an interface called "IEditorView",which has a method called
public JTextPane getSelectedPane();
I override this method in my class and there by I find the JTextPane.
Now I am able to make use of the method doc.remove(int off,int length);(doc is the StyledDocument)
But...when I tryied to insert something into my doc,exceptions arises..
Here is the Exception: ArrayIndexOutofBounds Exception.
and it gives a line no, where I find the method
setVisible(true); I am very sure that the index I have entered in the method doc.insertString(),is very correct .
Here I post my button's action class:
class FontAction implements ActionListener,ItemListener,IEditorView
public JTextPane getSelectedPane()
IEditorView view=(IEditorView) tabPane.getSelectedComponent();
return (JTextPane)view.getSelectedPane();
public void actionPerformed(ActionEvent e)
JTextPane text=getSelectedPane();
StyledDocument doc=text.getStyledDocument();
SimpleAttributeSet set=new SimpleAttributeSet();
int start=text.getSelectionStart();
int end=text.getSelectionEnd();
String selected=text.getSelectedText();
if(e.getSource().equals(butt[0]))//Bold
try{
StyleConstants.setBold(set,true);
doc.remove(start,selected.length());
doc.insertString(start,selected,set);//I get exception here
}catch(Exception e1){System.out.println(" EXCEPTION Inside 'Bold' button.....\n"+e1);}
if(e.getSource().equals(butt[1]))//Italics
if(e.getSource().equals(butt[2]))//UnderLine
if(e.getSource().equals(butt[3]))//Strikeout
if(e.getSource().equals(butt[5]))//Color
JColorChooser cc = new JColorChooser();
cc.showDialog(new JPanel(),"Color Bank",Color.black);
cc.getSelectionModel().addChangeListener(
new ChangeListener() {
public void stateChanged(ChangeEvent e) {
public void itemStateChanged(ItemEvent p1)
if(p1.getSource().equals(combo[0]))//Font-family
if(p1.getSource().equals(combo[1]))//font-size
}Please help me its URGENT......
Thanks & regards
N.A.Sasivarnan
Try to replace
doc.remove(start,selected.length());
doc.insertString(start,selected,set);
by
doc.setCharacterAttributes(start, end-start, set, true);
Hope this help
Similar Messages
-
Problem on loading applet netscape4.73 in macos9 very urgent pls help me
Hello,
Problems on loading applet in Netscape4.73(jre1.1.5) AppleMac OS-9.
when i try to load applet of size ~ 200kb in Netscape 4.73 AppleMac os9, then browser abruptly closing with the AppleMac os error message :- the Applicarion " Netscape Communicator " has unexpectedly quit because an error of type 2 occured. And then asking for system restart.
Since i am new to the AppleMac environment i cant adjust the settings please help me to overcome the problem. Its Very urgent and i am in great hurry pls.
thanks in advance.
Rao. V.N.Hi Rao,
I'm not a mac-os specialist (even I had some business with mac !!), and it is very difficult speaking in blind, but I have severals questions that may help you.
- Did you try you applet in other AppleMac plateform ?
- Does your applet work fine in other browser/plateform ?
- Does a small applet work fine on this plateform with this browser ?
- Does you applet contains instructions like System.exit, System.* or try to access (read or write) to local files ?
Otherelse it is possible you have problem with your jre config, try to configure your plugin with command like : -Xmx64m -Xms16m
(These commands tell the plugin to use at least 16 Mo memory and 64 Mo for the maximum see : http://java.sun.com/docs/hotspot/gc/)
Hope that will help you -
I have a MacBook Pro 13.3 OS- MAC OS X LION.
Whenever I am staring the computer, it says You need to restart your computer by pressing the power button.
I did this number of times and everytime it freezes to the same screen.Solution needed urgently pls.
Thank you for any help in this regard that comes fast.The details of the kernel-panic report is as follows-
Interval Since Last Panic Report: 1458653 sec
Panics Since Last Report: 6
Anonymous UUID: 70BA6A**************************************************
Sun Sep 16 23:00:13 2012
panic(cpu 0 caller 0xffffff80002c4794): Kernel trap at 0xffffff8000290560, type 14=page fault, registers:
CR0: 0x0000000080010033, CR2: 0x0000000000800028, CR3: 0x000000000a509005, CR4: 0x00000000001606e0
RAX: 0x0000000000000001, RBX: 0x0000000000820000, RCX: 0xffffff801122dc40, RDX: 0x0000000000020501
RSP: 0xffffff80ef3d3da0, RBP: 0xffffff80ef3d3dc0, RSI: 0x000000002b1d78b6, RDI: 0xffffff800342d280
R8: 0xffffff80ef3d3f08, R9: 0xffffff80ef3d3ef8, R10: 0x000000010d901000, R11: 0x0000000000000206
R12: 0xffffff800342d280, R13: 0x0000000000000000, R14: 0xffffff8011cd6500, R15: 0x0000000000800000
RFL: 0x0000000000010206, RIP: 0xffffff8000290560, CS: 0x0000000000000008, SS: 0x0000000000000000
CR2: 0x0000000000800028, Error code: 0x0000000000000000, Faulting CPU: 0x0
Backtrace (CPU 0), Frame : Return Address
0xffffff80ef3d3a50 : 0xffffff8000220792
0xffffff80ef3d3ad0 : 0xffffff80002c4794
0xffffff80ef3d3c80 : 0xffffff80002da55d
0xffffff80ef3d3ca0 : 0xffffff8000290560
0xffffff80ef3d3dc0 : 0xffffff800026c9c3
0xffffff80ef3d3f40 : 0xffffff80002c3fbb
0xffffff80ef3d3fb0 : 0xffffff80002da481
BSD process name corresponding to current thread: fsck_hfs
Mac OS version:
11E2620
Kernel version:
Darwin Kernel Version 11.4.2: Wed May 30 20:13:51 PDT 2012; root:xnu-1699.31.2~1/RELEASE_X86_64
Kernel UUID: 25EC645A-8793-3201-8D0A-23EA280EC755
System model name: MacBookPro9,2 (Mac-6F01561E16C75D06)
System uptime in nanoseconds: 4850001132
last loaded kext at 1796984176: com.apple.driver.BroadcomUSBBluetoothHCIController 4.0.7f2 (addr 0xffffff7f80e16000, size 57344)
loaded kexts:
com.apple.driver.BroadcomUSBBluetoothHCIController 4.0.7f2
com.apple.driver.AppleUSBTCButtons 227.6
com.apple.driver.AppleUSBTCKeyEventDriver 227.6
com.apple.driver.AppleUSBTCKeyboard 227.6
com.apple.driver.AppleIRController 312
com.apple.AppleFSCompression.AppleFSCompressionTypeDataless 1.0.0d1
com.apple.AppleFSCompression.AppleFSCompressionTypeZlib 1.0.0d1
com.apple.BootCache 33
com.apple.iokit.SCSITaskUserClient 3.2.1
com.apple.driver.XsanFilter 404
com.apple.iokit.IOAHCISerialATAPI 2.0.3
com.apple.iokit.IOAHCIBlockStorage 2.0.4
com.apple.driver.AppleFWOHCI 4.8.9
com.apple.driver.AirPort.Brcm4331 560.7.21
com.apple.driver.AppleSDXC 1.2.2
com.apple.driver.AppleUSBHub 5.0.8
com.apple.iokit.AppleBCM5701Ethernet 3.2.4b8
com.apple.driver.AppleEFINVRAM 1.6.1
com.apple.driver.AppleSmartBatteryManager 161.0.0
com.apple.driver.AppleAHCIPort 2.3.0
com.apple.driver.AppleUSBEHCI 5.0.7
com.apple.driver.AppleUSBXHCI 1.0.7
com.apple.driver.AppleACPIButtons 1.5
com.apple.driver.AppleRTC 1.5
com.apple.driver.AppleHPET 1.7
com.apple.driver.AppleSMBIOS 1.9
com.apple.driver.AppleACPIEC 1.5
com.apple.driver.AppleAPIC 1.6
com.apple.driver.AppleIntelCPUPowerManagementClient 195.0.0
com.apple.nke.applicationfirewall 3.2.30
com.apple.security.quarantine 1.3
com.apple.security.TMSafetyNet 8
com.apple.driver.AppleIntelCPUPowerManagement 195.0.0
com.apple.driver.AppleUSBBluetoothHCIController 4.0.7f2
com.apple.iokit.IOBluetoothFamily 4.0.7f2
com.apple.driver.AppleFileSystemDriver 13
com.apple.driver.AppleUSBMultitouch 230.5
com.apple.driver.AppleThunderboltDPInAdapter 1.8.4
com.apple.driver.AppleThunderboltDPAdapterFamily 1.8.4
com.apple.driver.AppleThunderboltPCIDownAdapter 1.2.5
com.apple.iokit.IOUSBHIDDriver 5.0.0
com.apple.driver.AppleUSBMergeNub 5.0.7
com.apple.driver.AppleUSBComposite 5.0.0
com.apple.iokit.IOSCSIMultimediaCommandsDevice 3.2.1
com.apple.iokit.IOBDStorageFamily 1.7
com.apple.iokit.IODVDStorageFamily 1.7.1
com.apple.iokit.IOCDStorageFamily 1.7.1
com.apple.driver.AppleThunderboltNHI 1.6.0
com.apple.iokit.IOThunderboltFamily 2.0.3
com.apple.iokit.IOSCSIArchitectureModelFamily 3.2.1
com.apple.iokit.IOFireWireFamily 4.4.5
com.apple.iokit.IO80211Family 420.3
com.apple.iokit.IOEthernetAVBController 1.0.1b1
com.apple.iokit.IONetworkingFamily 2.1
com.apple.iokit.IOUSBUserClient 5.0.0
com.apple.iokit.IOAHCIFamily 2.0.8
com.apple.iokit.IOUSBFamily 5.0.8
com.apple.driver.AppleEFIRuntime 1.6.1
com.apple.iokit.IOHIDFamily 1.7.1
com.apple.iokit.IOSMBusFamily 1.1
com.apple.security.sandbox 177.5
com.apple.kext.AppleMatch 1.0.0d1
com.apple.driver.DiskImages 331.7
com.apple.iokit.IOStorageFamily 1.7.2
com.apple.driver.AppleKeyStore 28.18
com.apple.driver.AppleACPIPlatform 1.5
com.apple.iokit.IOPCIFamily 2.7
com.apple.iokit.IOACPIFamily 1.4 -
Global_attribute20 field in ap_payment_schedules_all table - Urgent Pls
All,
Version: 11.5.10.2
I created an invoice, from the 'Scheduled Payments' tab I checked the 'Hold' flag. After the flag is checked in the UI, I noticed the global_attribute20 field in the ap_payment_schedules_all updates to 'EP' along with the hold_flag='Y'. I want to know the significance of global_attribute20 and what are all the other possible values of this field like 'EP'??
this is quite urgent, pls help.
rgds
senHave you tried to enable trace on this form to find out how this column gets populated?
FAQ: Common Tracing Techniques within the Oracle Applications 11i/R12 [ID 296559.1] -- 3. How does one enable trace in the Oracle Application screens / forms?
Can you reproduce the issue with other invoices?
Do you have any other instance where you can try the same and see if the issue is reproducible?
Thanks,
Hussein -
i am use iphone 4s i have upgrade ios 8.1 i have problem in ios 8.1 pls guide me how to restore 7.1 ios pls guide
It isn’t possible to downgrade the device. Look for solutions which don’t involve doing so, or post the problem you’re having on these boards.
(120235) -
Routine in Bex - urgent pls.
I have 2 columns A and B in the report:
A B C
1234 1234 1234
5903 0 5903
0 3287 3287
I want to get the column C.
So, the condition for the column C would be :
if A<>0 and B <>0 then A
else if A==0 then B
else if B==0 then A
I heared that this can be done by routines . I need the code to do this . Also let me know where to put the code.
This is urgent pls.
VaishaliHi,
No need to write coding.....directly u can get these by unsing formula as told in the above forum....there u get all these conditions in Boolean operators. so just make use of them..
Thanks & Regards -
Problem in JAXRPC Webservice - Urgent
This is Santhakumar.
I have developed and deployed a JAXRPC webservice in Tomcat5.0 with JWSDP1.5.
WSDL is created and it works fine for normal java remote methods.
But when I write a code for to connect a live server ( EPP-Extensible Provisioning Protocol TCP server ), I could not invoke the service.
I get the following error:
================================================================
C:\examples\jaxrpc\dynamicproxy>ant run
Buildfile: build.xml
run-client:
[java] UrlString = http://localhost:8080/domain-jaxrpc/domain?WSDL
[java] java.rmi.ServerException: JAXRPCSERVLET28: Missing port information
[java] at com.sun.xml.rpc.client.StreamingSender._raiseFault(StreamingS
ender.java:497)
[java] at com.sun.xml.rpc.client.StreamingSender._send(StreamingSender.
java:294)
[java] at com.sun.xml.rpc.client.dii.CallInvokerImpl.doInvoke(CallInvok
erImpl.java:79)
[java] at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:48
2)
[java] at com.sun.xml.rpc.client.dii.CallInvocationHandler.doCall(CallI
nvocationHandler.java:121)
[java] at com.sun.xml.rpc.client.dii.CallInvocationHandler.invoke(CallI
nvocationHandler.java:85)
[java] at $Proxy0.domainCheck(Unknown Source)
[java] at dynamicproxy.DomainClient.main(Unknown Source)
run:
BUILD SUCCESSFUL
Total time: 3 seconds
C:\examples\jaxrpc\dynamicproxy>
===========================================================================
I tried in many ways to resolve it.But still I could not find out any solutions.
Is there any security settings to be handled for that?
The method works fine and the server is connected when I execute it from the normal java class in command prompt.
But when implementing that method in JAXRPC webservice only I found this problem.
Please share your ideas with me to resolve this problem.I am at urgent.
Thanks in advance.
Santhakumar.
The sample example site used is:
http://www.cis.umassd.edu/~hxu/Projects/UMD/WebServices/Please check the OSS note - 1041204 - Controlling COMMIT WORK in production order BAPIs
Hope this helps you. -
Depreciation Posting in AFAB (urgent Pls)
Hi All,
pls let me know y the depreciation posting is not hapenning when it is showing Document created in Test run. It is not showing any errors nor is it posting. urgent pls.
Chatura.Hi,
Thanks for replying. It did not create any RABUSH Session .
1) I created an Asset and gave the Depreciation Start date as 01.09.07.
2) then i posted an entry in F-90 with transaction type 100, on 01.09.07.
3) The periods are kept open only.
4) The number Ranges for AF Document exists.
5)i did an unplanned posting run for 1 to 8 periods. for 9th period i did the Repeat run . It generated an accounting entry with AF document type.
6) now if i'm trying to do the test run for 10 th period it shows that the Document is created but in the repeat run it is neither posting the document nor is it showing the error.
I was not able to analyse the reason.
Pls help me out. Also pls let me know where to select the direct FI posting in asset accounting. Points will be awarded infull if the issue is solved.
Regards,
Chatura. -
my iphone 4s can not scan any wifi network, i tried everything but still can not scan any wifi connection even though our wifi is working properly in our mac book and ipad. What do i need to do if the problem is the hardware?pls help
When you say it "can not scan any wifi network" do you mean it is not detecting Wi-Fi networks?
Is Wi-Fi turned on in Settings > General > Wi-Fi?
Have you tried Settings > General > Reset > Reset Network Settings?
Is it just the home network that the device will not connect to? or any network? -
I need one recurcive(unended loop) pl/sql example, its very urgent pls
Hi,
I need one recurcive (unended loop) pl/sql example, its very urgent pls
Thanks,
Sathis.I suppose you'll want to know how to get out of your undended loop too (although that does stop it being unended).
Example...
SQL> ed
Wrote file afiedt.buf
1 DECLARE
2 v_cnt NUMBER := 0;
3 BEGIN
4 LOOP
5 EXIT WHEN v_cnt = 1000;
6 v_cnt := v_cnt + 1;
7 END LOOP;
8* END;
SQL> /
PL/SQL procedure successfully completed.
SQL> -
Infospoke problem - opeb hub service - urgent
hello friends,
I am trying to run one infospoke but getting the below error.
*The 3rd party status for request ATTRIBUTE_MSGV3 has not yet been set*
I have checked all the source and traget structures , which are active .
The source system connection is also OK.
RFC is also OK .
Could you please let me know , how to solve this problem , it is quite urgent .
Thanksrefer:
http://help.sap.com/saphelp_nw04s/helpdata/en/a8/a6eae34c9e9b4cbd8fbc7acd2845d0/frameset.htm
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/5f12a03d-0401-0010-d9a7-a55552cbe9da -
Its urgent pls help me .
how can i call a portal from webdynpro application
my requirment is
i was created webdynpro application.
in that i was created one view . in that i was created one button (go).
if i click that button i want move some other portal.
how can i acchive pls help me.
its urgent.
pls send any example programe
Message was edited by:
madipadiga nagaraju
Message was edited by:
madipadiga nagarajuhi,
there is no direct tcode for going to webdynpro component/interfaces in ecc 6.0.
but u have se58 in ecc 5.0,as webdynpro convertor.u give ur program name and click web dynpro convertor button then it takes u to se80 .but this wda(webdynpro abap) component comes as in application tree hierarchy .
i can say in wda component refers a class .if u select webdynpro component/interface,it ask u to create a class or interface.
after that it automatically generate component controller(it is also a class),
interface view and windows.all these 3 are classes.for every window one interface view will be created.ie.. window is internal visible where as interface view is external visible.
u create view and embed these views in windows.by going to the window layout,right click on the window name and click embed view.u can enbed as many view as u wish.in order to navigate from one view to other view ,click "create navigation" by right clicking the view plugs.
by default windows and view have inbound plugs.this is literally a event of that class.
if u want to navigate from view1 to view2 ,create outbound plug for view1,the click outbound plug of view1 and right click the click create navigation the select inbound plug of view2.
then create a application .this is simillar of creating an object.
click on this object and test .this will open in browser.
for deploying u have use "sap webdynpro iview". -
Telnet connection---urgent pls
each time i try to telnet using my LAPTOP.I get command not recognised.can somebody help me out now.Other PC works except mine.This is very urgent pls.
Download Putty
Search on google " Putty ".... using putty telnet.
You can open Hyperterminal and choose TCP/IP option instead of COM1.
Click on OK
You will telnet into device.
Putty use is very good very secure.
Regards,
Dharmesh Purohit -
iPhone 4-Caller can't hear my voice. Checked the mute button and had restart the phone. Still problem occurred. HELP ME PLS!
I'm having same problem with my 3G. When I adjust my ringer volume it says headphone in parentheses. I can still hear thru headphones. Until u get it fixed maybe u could try this as a temp solution. Good luck.
-
Hi since sunday,my imessages are not working..i cannot even send normal sms to iphone users..is there any problems in the software ? pls advice
Found the rootcause. The battery was damaged and unable to have enough power to keep the device alive. After changing the device problem is solved.
Maybe you are looking for
-
Development in case of upgrade
Dear Experts, I am new to BI.I got task to modify one query for clients purpose.My doubts is how to start these developments in below scenario.I am a bit scared as I am new to BI and heard so many procedures and how careful we need to be while doing
-
How to create a Log file on Client machine
Hi All, I am trying to create a log file on my local machine using TEXT_IO.FILE_TYPE in a stored procedure but it is throwing a compiler error as Error(5,10): PLS-00201: identifier 'TEXT_IO.FILE_TYPE' must be declared. I seem it is occuring because o
-
I have a 2009 iMac and a mid 2007 Macbook. I also have an HTPC running Windows 7. I can connect fine to the HTPC from either the iMac or the Macbook, however, I am completely unable to connect to my Macbook or iMac from my PC. This was never a proble
-
Data services - invalid CMS connection information
Hi, I am installing Data services 4.1 on one server and trying to connect cms which is another server. When i enter the username and password of the cms server during the installation. i get the below error. "you cannot proceed as the following has f
-
Exception in detailed navigation
Hi All, I am getting exception for detailed navigation par file. Here is the details about the exception Portal Runtime Error An exception occurred while processing a request for : iView : N/A Component Name : N/A com.sapportals.portal.navigation.INa