JScrollPane Auto Scrolling for Teleprompter

I am working on a piece of software to scroll text for a teleprompter. I have a class that scrolls the text that is in a JEditorPane nested in a JScrollPane. Here is the class that scrolls the text:
package teleprompter;
import javax.swing.JScrollPane;
public class Scroll extends Thread
    JScrollPane scrlMain;
    public Scroll(JScrollPane scrlMain)
        this.scrlMain = scrlMain;
    public void run()
        int iPos = scrlMain.getVerticalScrollBar().getValue();
        for (;;)
            iPos += 5;
            scrlMain.getVerticalScrollBar().setValue(iPos);
}My problem is that it is not a consistent, smooth scroll so that someone can read it. It is real jumpy, sometimes it will jump an entire page. For now, the speed of the scroll can be changed by making the 5 in "iPos += 5" a higher number.
Is there a better way to do an auto scroll that is not so inconsistent and jumpy that anyone can think of?
Edited by: 879705 on Aug 18, 2011 1:40 PM

879705 wrote:
I am working on a piece of software to scroll text for a teleprompter. I have a class that scrolls the text that is in a JEditorPane nested in a JScrollPane.One possibility occurred to me, although I'm no GUI expert and it maybe totally the wrong approach.
One of the characteristics of a teleprompter (at least in most Western languages) is that new text is always likely to appear at the bottom so, rather than worrying about scrolling, why not either:
(a) Set the scroll value to 100% and add new lines to the end as and when required, or
(b) Maintain the text array yourself and simply display it in a fixed area.
It seems to me that the same technique could also be combined with text animation to display a line at a time.
However, as I say, I'm no GUI expert, so feel free to laugh...
Winston

Similar Messages

  • Need debugging help: Why is JScrollPane auto-scrolling?

    I'm trying to figure out why when I double-click on a cell within a JTable that's wrapped in a JScrollPane in order to open up another window, the JScrollPane automatically scrolls to the top.
    Even when I update the double click operation to simply call setSelected(false), the JScrollPane still automatically scrolls to the top.
    I added myself as a change listener to the scroll pane's row header view port, and captured the following stack trace.
    I'm having trouble debugging exactly what is causing the following chain of events to fire. If I try to put a debug breakpoint on a method like EventQueue.invokeLater() that's probably initiating the following chain of events, I can't even get back to my application window from my IDE without having to dismiss all of the breakpoints that are reached.
    If I try to follow through from the double-click to the actual JScrollPane auto-scroll, I get lost in a maze of Swing events that I can't navigate out of.
    Any suggestions on how to appropriately debug this would be greatly appreciated.
    Thanks,
    Mike
    rowHeaderViewPort stateChanged fired
    chgEvent == javax.swing.event.ChangeEvent[source=javax.swing.JViewport[,1,21,0x329,invalid,layout=javax.swing.ViewportLayout,alignmentX=null,alignmentY=null,border=,flags=8,maximumSize=,minimumSize=,preferredSize=java.awt.Dimension[width=0,height=0],isViewSizeSet=false,lastPaintPosition=,scrollUnderway=false]]
    chgEvent source == javax.swing.JViewport[,1,21,0x329,invalid,layout=javax.swing.ViewportLayout,alignmentX=null,alignmentY=null,border=,flags=8,maximumSize=,minimumSize=,preferredSize=java.awt.Dimension[width=0,height=0],isViewSizeSet=false,lastPaintPosition=,scrollUnderway=false]
    java.lang.Exception: stack trace
         at MyForm$2.stateChanged(MyForm.java:192)
         at javax.swing.JViewport.fireStateChanged(JViewport.java:1341)
         at javax.swing.JViewport.setViewPosition(JViewport.java:1096)
         at javax.swing.ViewportLayout.layoutContainer(ViewportLayout.java:179)
         at java.awt.Container.layout(Container.java:1020)
         at java.awt.Container.doLayout(Container.java:1010)
         at java.awt.Container.validateTree(Container.java:1092)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validateTree(Container.java:1099)
         at java.awt.Container.validate(Container.java:1067)
         at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:353)
         at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:116)
         at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
         at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
         at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

    Thanks for your response. I examined the code and nowhere that I can see is it calling either of those two methods.
    At some point, it looks like something within my code or in the UI frameworks that I'm using is invalidating my JScrollPane. I'm having a very difficult time, though, tracking down exactly which component is causing that invalidation.
    Short of writing my own JScrollPane so that I can capture the stack trace of calls to invalidate(), does anyone have any suggestions for debugging this further? I tried to use a conditional breakpoint in Eclipse 2.1.3 (Component.invalidate() where the Component is an instance of JScrollPane), but my breakpoint is never being executed.
    Thanks,
    Mike

  • JScrollPane auto scrolling.

    Hi Friends,
    Basically I want text in the JTextArea added to the JScrollPane to scroll automatically.
    I have a JFrame to which I have added a horizontal JSplitPane. The Left side of the SplitPane consists of a JPanel with different components and the Right side consists of a JPanel with a JScrollPane containing the JTextArea which displays some Help/News etc.
    I want this text to keep on scrolling continuously, while the user does his work on the Left side, till me application exits.
    Please help me out on this.
    Regards,
    Ravi

    try this:
    JScrollPane scrollPane = new JScrollPane(textArea);
    textArea.setPreferredSize(new Dimension(100,300)):
    scrollpane.setPreferredSize(new Dimension(82,250));
    I am not sure whether it will work or not in your case.but it does work in my application.Hope it works!

  • Text - Auto Scroll Function

    Does my iPad have an  Auto Scroll   for Safari?
    Is there a "hidden" feature that I can use for reading a text with Safari?
    An automatic scroll (activated by an command) would be a comfortable function.
    I don´t want to use an App.
    Thanks

    Tap and slide up to scroll. Tap and flick up to move faster.
    There is no way I know off to have the screen automatically scroll.
    The iPad has many security features to prevent malware attacks. One of these is called Sandboxing. This keeps each app in its place and prevents apps from altering the system resources or other apps. So no other app will provide the auto scroll functionality to Safari.
    You can make suggestions to Apple here:
    http://www.apple.com/feedback/

  • s:textarea auto scrolling fail

    I'm using Flash Builder 4 with Flex 4 to build a chat and I'm unable to make an auto scrolling for <s:textarea> Spark component!
    I've tried "textarea.scroller.verticalScrollBar.value = textarea.scroller.verticalScrollBar.maximum" and "textarea.appendText()" but it doesnt scrolls the vertical bar totally! It remains a little bit cause of "\n" in the final of each message.
    In Flex 3 I used to do "textarea.verticalScrollbar = textarea.maxverticalScrollbar" and it worked always!
    Anyone can helpme?

    XXXxxx2 is right.
    I believe his approach would work on any IViewPort based component other than RichEditableText but RET is just borderline insane.
    The amount of understanding an application developer has to have to make this work is just too high; It's even worse than that since to make this work there is a litle hack involved that depends a lot on RET's implementation, that is, if you want to set the value to the maximum all during one invalidation so that you see no jumps ( which would be crap )
    The biggest issue is how convoluted RET can be and that there isn't enough easier hooks available to developers:
    Because range->set value and range->set maximum don't dispatch events ( even undocumented, magic string typed ones would be fine ) I have to listen to viewPort's contentHeight change events. But then it goes like this:
    _ viewport contentHeight changed
    _ Therefore the scrollbar maximum is changed by the framework
    _ I set scrollbar value to its maximum
    _ in scrollbar commitProperties, my value is retained, great !
    _ in that same commitProperties, the verticalPosition on viewPort is updated as expected
    _ A bit later, in RET commitProperties a viewPort's contentHeight is dispatched again because TextContainerManager does some crazy stuffs
    _ Therefore the framework changes the scrollbar maximum again...
    _ So I try to set the value to equal the maximum again...
    _ Then big fail, the next line in RET commitproperties (just after the above event dispatching ) just override the value I just set with the old one.
    So please, dispatch more events in setters, even undocumented ones, even if they don't trigger any bindings. You can even check if there are any listeners before dispatching as you did in other places.
    That or simplify RET, I don't know why TLF might decide to update the contentHeight if I just changed the vertical position. I'm really expecting just one contentHeight PropertyChange event when the content of the RET changed.

  • How to ceate auto scroll mp3 lyric for 5233 music ...

    I have a song that already has embedded lyric. When I played that song in my Nokia 5233 music player the lyric scrolls automatically. But when I tried to embed lyric using the softwares MediaMonkey, MiniLyrics etc. in one of my song and played in the music player, it did not auto scroll.
    So how do that song has auto scroll lyrics. Could any one let me know if there is any software to embed auto scroll lyric in MP3 so as to play in my default Nokia 5233 music player.
    Thanks in Advance.

    When editing info if you use the right click then get info option you will not be interrupted on editing.

  • Auto-scrolling doesn't work when JFrame is not visible

    Hi, I have auto-scrolling implemented for my JTextPane that sits in JScrollPane - which lives in JInternalFrame. It works as excepted - as long as my application's JFrame is visible. When the JFrame becomes invisible, auto-scrolling simply doesn't work anymore.
    I've overcame this by scrolling down in "windowShown", but it's ugly because the user can visually see the scroll down when using this workaround (it jumps).
    I guess this is Swing's optimization, but I would really like to overcome it in someway. But it seems I'm not enough a swing hacker to do it.
    One thing to note is thtat, the auto-scrolling works fine when the JInternalFrame is NOT visible, but frame is.
    I've tried to override the isShowing-method of JInternalFrame, with no luck.
    Here's my scrolling method:
    public static void scrollDown(JScrollPane scroll) {
              JViewport port = scroll.getViewport();
              Rectangle rect = new Rectangle(0, port.getViewSize().height, 1, 1);
              port.scrollRectToVisible(rect);
              JScrollBar bar = scroll.getVerticalScrollBar();
              bar.setValue(bar.getMaximum() - bar.getModel().getExtent());
         }Anyone have ideas?

    At some point I had really hard time getting the auto-scrolling to work, as I got these weird little bumps after scrolling down.
    Adding scrollBar.setValue() seemed to 'just fix it'. It actually seems to be superfluous now.
    The scrolling is already wrapped in SwingUtilities.invokeLater() - in conjuction with printing text into the JTextPane and it works OK.
    I had some wrong info in the first post, the viewport actually does get scrolled down even when the JFrame is not visible. And by visible I mean JFrame.setVisible(false) - my application has a minimize-to-tray feature, which hides the JFrame.
    So I think the problem is 'just' a repainting problem. When the frame is shown, the previous scroll location is first displayed, and then a repaint is triggered that causes the 'jump down'.
    I'm not still sure how to fix it though.

  • How to auto scroll from top to bottom on JTable ?

    HI All.
    At the current, I use JTable is contained JScrollPane. Now, I want Jtable auto scroll from first item to bottom and when JTable scroll to bottom then Jtable will scroll bottom to top, It is loop. Who know how do this function, please help me.

    Thanks for reply
    Actually. I was code -> scroll from top to bottom on JTable. Code below But when JTable auto scroll then screen is not smooth.
    Please help How to workground for this problem
    private void scrollTopToBottom() {
                   try {
                        JViewport viewport = flexGrid.getViewport();
                        int heightViewport = viewport.getViewSize().height;
                        while(moveY < heightViewport) {
                             synchronized (this) {
                                  while (suspended)
                                       this.wait();
                                  if (stopped)
                                       break;
                             moveY += 10;
                             if(moveY > heightViewport) {
                                  moveY = heightViewport;
                             viewport.setViewPosition(new Point(0, moveY));
                             try {
                                  Thread.sleep(500);
                             } catch (InterruptedException e1) {
                                  e1.printStackTrace();
                             viewport.updateUI();
                   } catch (InterruptedException e) {
              }

  • Auto-scrolling of list view in Finder windows sometimes doesn't work

    I've noticed a minor bug in 10.4 that doesn't seem to show up in 10.3.9, and I thought I'd comment on it here because it's mildly annoying, and I'm not sure that anyone at Apple is aware of the issue.
    My Pictures folder is pretty large -- I have over 6,000 items in it, some of which are themselves folders. I've got this folder set to list view. My typical usage pattern is to open a Finder window for my Pictures folder, start typing the first few characters of a file name, and then search from there. In 10.4.3 and later (up to and including 10.4.6 as of this writing), if the file in question is outside the viewport of the Finder window, the thumb on the scrollbar will jump to the correct location, but the actual viewport won't scroll to match; therefore, the file that gets highlighted isn't visible.
    The work-around is to manually scroll the contents of the window so that I'm "closer" to the file I'm looking for; alternately, I can type characters to get the ball rolling, and then hit the up or down arrow key a couple times (once won't do the trick) which will force the viewport to jump to the correct scroll location. Using this second method, I then have to move the selection back to the file, which is annoying since it's forcing me to use extra keystrokes.
    Interestingly enough, if I am careful and click on the scrollbar thumb without moving it too much (after typing the first few characters of the filename I'm looking for), the viewport will usually "snap to" the appropriate position. This suggests that the logic to auto-scroll the contents of a Finder window got subtly broken between Panther and Tiger. It just seems weird to me that the scrollbar thumb would jump without the viewport following suit automatically.
    This wasn't a problem in 10.3.9. I realize that we're being encouraged to use Spotlight and other search features, but since my pictures directory is already an alphabetic list view of files, why should I be forced to do a Spotlight search when I know what it is I'm after?
    Dual 2.0 GHz G5   Mac OS X (10.4.6)  

    I've been having the same problem (though I haven't looked at the console yet to verify the same exact error).
    There doesn't seem to be a situation that I can identify to cause the problem (i.e. waking from sleep mode), so it's difficult to reproduce consistently. The error seems to happen randomly. Last night I was getting the error every time I sent a single message. So I'd create and send a message, and then the next message I'd try to create or reply to, I couldn't. I'd have to quit Mail and start it again to gain functionality.
    When I do have the problem where the compose window isn't created when replying, I also can not start a new message, note, or forward a message. Basically, no new windows can pop up besides the windows that are already there in Mail. When I quit mail, every window I tried to create by replying, making a new message, or forwarding, appears in the draft folder, just before the program closes. Then, the next time I open Mail all the windows appear that I tried to create, with no text in them. Very strange. Looks like this poster has a similar problem.
    http://discussions.apple.com/thread.jspa?threadID=1197152&tstart=1020
    I'm curious if this is a bug, or something our machines just can't handle? I see that we all have very similarly spec'd PowerBooks.

  • HT4098 How do I turn off auto-renew for the Guardian?

    Trying to turn off auto-renew for The Guardian.  From PC. 
    I did the following:
    1. Launch iTunes on your computer
    2. Choose Store>Sign In from the iTunes menu.
    3. Enter your Apple ID and password when prompted. 
    4. Choose Store>View My Account. You may be asked to re-enter your Apple ID password.  Click
    View Account.  (I chose "iTunes Store", in the side bar, since the word "Store" in the menu bar didn't list "My Account". Then I chose "Account" in Quick Links, on the right-hand side of the screen. I got the "Account Information" ok.)
    5. From the Account Information screen, scroll to the bottomof the page to the Settings section.
    Then it said to:  6. Click "Manage" to the right of "Subscriptions".
    The word "Subscriptions" does not appear in the Settings section.  Nothing in the Settings section takes me to a page on which to manage my subscriptions.

    Hi
    Read this Subscribe to iTunes Match - Apple Support
    This includes a section about turning off auto renew.
    Jim

  • How to auto scroll a table to last row when using Active Data Service?  11g

    Hi all,
    Has anyone got any experience with the ADF Active Data Service?
    I am using an af:table in combination with the ADF Active Data Service and I want the table to scroll to the latest row when new data arrives.
    It is basically a simple setup:
    The value attribute of my table points to a bean that extends CollectionModel and implements ActiveDataModel. This works perfectly. A soon as I receive new data in my bean, the table is automatically updated (e.g. a new row is inserted). I use JDev version: 11.1.1.3
    The problem is that I can not get the scroll bar to move down to the last row automatically when new data arrives. The auto scroll only works for the client that actually performs a submit. In other words the person that submits the new data, will see his scrollbar move down, this is because I added the following code:
    RowKeySet rowkeysset = chatTableBinding.getSelectedRowKeys();
    rowkeysset.clear();
    rowkeysset.add(getRowKey());
    AdfFacesContext.getCurrentInstance().addPartialTarget(this.chatTableBinding);
    This does not work for the clients that receive the new data via the Active data model. Apparently the active data service partially refreshes the table, but not in such a way that it sets the selected row to the last row?
    My table definition:
    <af:table value="#{pageFlowScope.chatBean.instantMessagingChatwindowBean}" var="row"
    id="t1" columnStretching="last" rows="10"
    styleClass="AFStretchWidth" autoHeightRows="10" contentDelivery="immediate"
    horizontalGridVisible="false"
    verticalGridVisible="false"
    disableColumnReordering="true" displayRow="last"
    rowSelection="single"
    binding="#{pageFlowScope.chatBean.instantMessagingChatwindowBean.chatTableBinding}"
    inlineStyle="height:80px;">
    p.s.
    The table is used to show incoming chat message.
    I am building a chat client (taskflow) in a Webcenter application. The concept is similar of that presented by Lucas Jellemain in his blogpost on building a Google Talk Client http://www.oracle.com/technetwork/articles/jellema-googletalk-094343.html

    Dan,
    This is a thanks for posting your findings. You saved me quite some time.
    <af:selectBooleanCheckbox id="showOnlyActiveSubscriptions" selected="true"
    label="Show only active services:"
    value="#{servicePortfolioBean.showOnlyActiveSubscriptions}"
    autoSubmit="true" />
    <af:table binding="#{servicePortfolioBean.serviceTable}" ...
    partialTriggers="showOnlyActiveSubscriptions">
    Of course, when I add a "ValueChangeListener" to the selectBooleanCheckbox, the PPR stops working. :( I wonder why?

  • Auto scrolling dynamic text field(news ticker)

    > This message is in MIME format. Since your mail reader
    does not understand
    this format, some or all of this message may not be legible.
    --B_3272625483_2679871
    Content-type: text/plain;
    charset="US-ASCII"
    Content-transfer-encoding: 7bit
    Does anyone know how to make a scrollable dynamic text field
    scroll on its
    own and also with user interaction?
    Thanks in advance for your help.
    Bill
    --B_3272625483_2679871
    Content-type: text/html;
    charset="US-ASCII"
    Content-transfer-encoding: quoted-printable
    <HTML>
    <HEAD>
    <TITLE>Auto scrolling dynamic text field(news
    ticker)</TITLE>
    </HEAD>
    <BODY>
    <FONT FACE=3D"Verdana, Helvetica, Arial"><SPAN
    STYLE=3D'font-size:12.0px'>Does =
    anyone know how to make a scrollable dynamic text field
    scroll on its own an=
    d also with user interaction?<BR>
    <BR>
    Thanks in advance for your help.<BR>
    <BR>
    Bill</SPAN></FONT>
    </BODY>
    </HTML>
    --B_3272625483_2679871--

    I found this:
    http://www.kirupa.com/developer/mx/dynamic_scroller.htm
    I copied the actual scroller and put it in my .fla and it
    worked! Now if I can only figure out links in XML...

  • My auto-scroll 3rd button does not work in FireFox 3.6. It worked in previous FF versions.

    I have updated FireFox. My auto-scroll 3rd button now does not work in this version, 3.6 I have updated my mouse and checked the TOOLS "Use auto-scroll"... still it does not work.
    I need my equipment to work. PLEASE FIX

    I hate to sound like a broken record, DONE THAT ALREADY. _ _ _
    I've ALSO learned to reboot after an uninstall then manually delete any residue in said uninstalled program. I've also gone as far as REGISTER searching for program residue and deleting that WITH reboot of coarse to be sure nothing has gone wrong. _ _ _ NEXT suggestion? I suggest FireFox fix there software. _ _ _ BY-THE-WAY,... I have also gone through my mouses buttton choices for my #5 button. Everything works but the "Auto-Scroll". One tab down/up/right/left works, one page down/up/left/right works. _ _ _ I used recently tried and successfully used the Auto-Scroll in Netscape, Opera, My Browser, Ace Browser, Chrome, and 2 others that escape my memory. _ _ _ PLEASE READ and understand this. >>> It's FireFox's software that is stopping this, not my mouse or PC.

  • How do you enable Auto Scroll in a sequence pane, and MIDI devices?

    Hello,
    I am just getting used to Garage Band for the first time. I am finding that Garage Band is much easier to deal with than Mark Of the Unicorn from a musical standpoint.
    I am now converting my many MIDI sequences to GB. I have run into these three issues that I cannot seem to figure out.
    1. I have both the "Main Secuence" pane and the "Piano Roll/Score" pane arranged vertically. But the Secuence pane auto scrolls, as the timing progresses, but the "Piano Roll/Score" pane does not. How do I get these two windows to enable/disable auto scroll?
    2. How do I select from a starting bar to ending bar, for a given track, coping it, and pasting it to another track in the another track's sequence point?
    3. How do I add other MIDI decices that I have pysically connected, and assign specific tracks to these physical MIDI divices and their defined Timbers?
    Thanks in Advance.
    Jeff Cameron

    Thank you very much, Cristoph!
    With your help, you have answered both questions 1 and 3.
    Concerning question 2, I can see that when I click on the track header, the entire track is selected, but I am trying to physically select from one bar to another in that track.
    I've tried clicking on the start bar and draging to the end and releasing. The whole track is still selected.
    I've tried holding down the Shift key and doing the same. Still the whole track is still selected.
    I guess I am missing the basics of marking and selecting the start and end point from within a basic track.
    I'm already much farhter along with your help, and I appreciate your help, very much!
    Jeff Cameron
    (More a computer geek than a musician.)

  • Mail Drag and Drop to mailboxes not auto-scrolling

    When dragging a mail message to the sidebar and the mailbox I want to drag it to is not in sight, on earlier OSes, I used to be able to drag and hold to the top or bottom of the sidebar and it would auto-scroll so I could drop the message where I wanted. On Yosemite, no auto-scrolling happens. Is this just me or are other experiencing the same problem and/or does someone have a solution?

    beezaman,
    I also experience this issue. If I turn off or Hide if you will the Favorites Bar and the Toolbar then I'm able to drag a file to scroll up or down in the sidebar.  As I know hiding the toolbars isn't something many people would want to do, I would encourage sending Apple feedback about this issue. You can do so at the following link: https://www.apple.com/feedback/macosx.html
    For me a solution for now would be to use the scroll whilst dragging feature of the trackpad. Click and drag a message over the sidebar and then whilst still holding down the left click I can scroll up or down using the trackpads two finger scroll.
    Hope that helps,
    Weston

Maybe you are looking for

  • Problem  in Adobe Form

    Hi, I have some problem in adobe form................................. I have to design  my adobe form in  ADOBE DESIGNER layout. and in the another end i have make my application programe in which i picke some data from the sap tables. now my proble

  • How to unlock Sales Document (Sales Order)?

    Dear All, I was in the process to change a Sales Order. I did all the entries in required fields and before I could save the Sales Order, somehow, my SAP-Connection got disconnected. I logged again and run the T. Code: VA02 and gave the Sales Order N

  • Error 14 on iPhone 5 wont restore

    I was trying to factory restore my iPhone 5  in intunes and its now stuck in dfu mod suggestions ?

  • Spent all this money on a Time Capsule I can't use...

    I am trying to backup my data, which is 500gb... It took a week to get to 280gb and then the Time Capsule errored out, I assumed it was taking so long because it was trying to backup over Wireless??? Even though I had an ethernet cord plugged into th

  • Can not access my net zero email on firefox but can on internet explorer.

    I've been using version 5.0 with out issue. Installed and ran AVGs PC Tools computer scan. AVG failed to correct found errors. After that, firefox would no longer go to net zero message center. It says it is loading: Loading [email protected]...... B