Primary line number

Hi Cisco techs,
7912 IP phone fails to register in CME 3.3. 
CME shows name of user, MAC address, phone sequence number, telephone number and the type being normal but doesn't register when doing command
sh ephone registered
Replies with no ephone in specified type/condition
Sh ephone output is 
cme_router#sh ephone
ephone-1 Mac:0017.9570.8E67 TCP socket:[-1] activeLine:0 UNREGISTERED
mediaActive:0 offhook:0 ringing:0 reset:0 reset_sent:0 paging 0 debug:0
IP:0.0.0.0 0 Unknown 0  keepalive 0 max_line 0
Sh telephony-service output is 
cme_router#sh telephony-service
CONFIG (Version=3.3)
=====================
Version 3.3
Cisco CallManager Express
For on-line documentation please see:
www.cisco.com/univercd/cc/td/doc/product/access/ip_ph/ip_ks/index.htm
ip source-address 192.168.3.0 port 2000
load 7912 cp791208000sccp051117a.sbin
max-ephones 4
max-dn 5
max-conferences 4 gain -6
dspfarm units 0
dspfarm transcode sessions 0
hunt-group report delay 1 hours
max-redirect 5
time-format 24
date-format dd-mm-yy
timezone 0 Greenwich Standard Time
keepalive 30
timeout interdigit 10
timeout busy 10
timeout ringing 180
caller-id name-only: enable
web admin system name admin  password xxxxxxxxxxxxx
web admin customer name xxxxxxxxxxxxx
edit DN through Web:  enabled.
edit TIME through web:  enabled.
Log (table parameters):
     max-size: 150
     retain-timer: 15
create cnf-files version-stamp 7960 Mar 01 2002 23:35:36
local directory service: enabled.
I can ping the phone from the router no troubles
And the router clock keeps going back to 19:43:41.519 14:54 Fri Mar 1 2002
Please advise further. Thanks again. Let me know if more information is required

OK. IP source-address is correct. 
cme_router#sh ip int brief | e una
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            192.168.0.12    YES NVRAM  up                    up  
FastEthernet0/0.1          192.168.1.2     YES NVRAM  up                    up  
FastEthernet0/0.2          192.168.3.2     YES NVRAM  up                    up  
Debug ephone register output
cme_router#debug ephone register
EPHONE registration debugging is enabled
cme_router#
TFTP server address is 192.168.3.0.
Phones IP address is 192.168.3.1
Let me know if more information is required. Thanks Brian in advance

Similar Messages

  • Upgraded primary line, phone not connected yet, want to use phone on 2nd line instead

    I renewed my primary line (new every 2) and received a Convoy today. My husband doesn't want to use this phone and wants to stick with the Boulder which is the current phone on the primary line. How can I activate the new phone for my secondary line (which is on a month to month basis ie no contract basis, but not a prepaid phone)? A Verizon support person told me I could do this if we didn't want to use the Convoy on the primary line. I hope she was right.
    Thanks!

    She would have been correct. If you dial 1-877-807-4646, punch in your husband's number when it requests it (it may request the account's password/last 4 of SSN as well). There will be an automated system that will ask you to accept the Terms & Conditions for the upgrade that was done on your husband's line. Note: this will extend the contract on your husband's line by 2 yrs which is a result of you getting the new phone at discounted pricing, but it will not effect your line's contract at all. Once you say you agree (by pressing option 1) it will ask if you would like to activate this device on your husband's line now. You're going to choose the option to do it later meaning you will not be activating it on your husband's line. Once it confirms your selection, you will hang up.
    Before you activate the phone on your line, make sure your contacts are backed up from your previous phone so you can transfer them to the new one. Backup Assistant, a free app offered by BUA, will be excellent for this purpose. Once everything is backed up, you will first want to turn off your old phone and then dial *228 from the new phone (choose option 1). When it asks for you to input a number, you want to enter yours and then it will ask you to enter the account's password/last 4 of SSN. Afterwards it will activate the new phone on your line. You would just need to re-download BUA and follow the prompts to transfer the contacts. Then you'll be all set!

  • How to set primary line...

    Hello,
    I'm currently using a PAP2T with the two lines enabled.  I would like to configure the adapter so that all incoming calls will only come to one of the lines.  Is this possible?  How do I do this?
    Thanks,

    Hi,
    Line1 - register YES, call without registration NO (YES is also possible, but NO will cause no dialtone when registration fails), IP dialing YES
    => primary line, this one will be ringing one as sendng "regstration" makes the VoIP provider aware of the "alive" device and where to send "calls"
    => register YES makes it a "primary" line, call without registration NO makes dialtone on this line only appears when device is registerred.
    Line2 - register NO, call without registration YES, IP dialing YES
    => secondary line, not ringing on incomming calls, VoIP operator will not "know" about this line except if it's calling
    => register NO makes it a "secondary" line, call without registration YES makes dialtone sound on this line anytime and allows calls
    =================
    => IP dialing YES is not related to your problem, it's only handy "nice_to_have" feature allowing adapter/YOU to call IP address of another
         similar VoIP adapter/VoIP phone on any IP address it can directly reach ... without involving VoIP operator ... and thus free
         (this works for adapters in same network, and/or for adapter sitting on public IP addresses or with port redirects from public IP addresses)
         this can be useffull for friends - your friend has to tell you what his/her IP address/port is ... and you can call.
    For example, to call "number" 55577923 on IP address 86.97.108.209 port 5061 you will dial this on your phone :
    55577923*86*97*108*209*5061 ... (in fact, you call sip:[email protected]:5061) - if such an adapter with
    the given number shall be connected on the mentioned IP address and set SIP port to 5061, the adapters will talk directly.

  • Change Primary Line

    I have a family share plan with three phones on it. I am the owner of the account but some how when I added a line it became the primary one and mine is no longer it. I get a discount on plans and data packages at work but only for the primary line. How can I change the primary line back to my number?

    Dial *611 from your phone and ask a representative to make the switch.  You can also take care of this in store.

  • Non-"primary line" backup assistant management

    how do you manage a non-primary line's backup assistant from the web?  seems like the only capability is to manage the primary line's contacts.  i have 5 lines and want to manage contacts on the other 4 phones.

    You need to create a MyVerizon account for EACH of the lines; they will each have their own log in and password. Secondary lines will not see any billing information, but they will be able to manage backup assistant for the phone associated with that number.
    Creating the accounts will take a bit of time initially, but backups can be automatic and once they are set up, it makes upgrading or swapping phones much easier.
    If you get the message that the number is already registered, you'll need to log totally out of Verizon and possibly clear cookies before trying to register with each secondary number.
    HTH,

  • Line number logic in a vo attribute

    HI
    There is a line number field in my entity( and vo) which i want to default to number lines in my view object +1.
    Is there any way of doing this using groovy expression?
    Navneet

    Well, as long as you can't handle the simultaneous input of lines (which you can't in a web application) your use case doesn't make sense. There is no gapless sequence. Each and every solution which promise to work, does not.
    Here is what you can do: When inserting a new row count the actual number of rows (e.g. select count(*) from table) add one to the count (or use the number you get if your rows are zero based, try to commit the new row. If you get an error check if it's a multiple primary key error and add 1 to the line no and try to commit again. At one time you success to commit the new row.
    However, you can't do this in groovy. You have to write plenty of java for this. However, I can't guarantee that this will generate a gapless line number as you might run into a race condition where two module (users) try to insert a new row at exactly the same time.
    Timo

  • Delivery schedule line number in make to order

    Hi all,
    i am doing make to order scenario with 20 strategy group. In sales order we r defining the different delivery schedule lines.when i run the MRP and getting the plan orders for all the FG material and semifinished material, the sale order number and sale order item number is getting updated in production order . Beside these two , delivery schedule line number is not populated and delivery date is not picking correctly in production order.
    please give your valuable suggestion .
    i would be highly thankful to u
    regards
    piyush

    Hi
    When you do the MRP Run at MD02, maintain the Delivery Schedules as 3 (schedule lines), so when ever you do the MRP Run, it will run along with the delievry date.
    reward if it helps
    Regards
    Prasanna R

  • Delivery schedule line number in sales order is not populated in production

    Hi all,
    i am doing make to order scenario with 20 strategy group. In sales order we r defining the different delivery schedule lines.when i run the MRP and getting the plan orders for all the FG material and semifinished material, the sale order number and sale order item number is getting updated in production order . Beside these two , delivery schedule line number is not populated in production order.
    please give your valuable suggestion .
    i would be highly thankful to u
    Will reward points.
    Regards
    Kumaraguru

    Hi Kumar,
    Some changes done in your PRD server.If yes then contact abap consultant regarding the same.
    Because these type of problem comes when you do transport or changes done in the system.
    Regards,
    Anil

  • Delivery schedule line number in sales order is not populated  in productio

    Hi all,
    i am doing make to order scenario with 20 strategy group. In sales order we r defining the different delivery schedule lines.when i run the MRP and getting the plan orders for all the FG material and semifinished material, the sale order number and sale order item number is getting updated in production order . Beside these two , delivery schedule line number is not populated in production order.
    please give your valuable suggestion .
    i would be highly thankful to u
    Regards
    Kumaraguru

    Hi Kumar,
    Some changes done in your PRD server.If yes then contact abap consultant regarding the same.
    Because these type of problem comes when you do transport or changes done in the system.
    Regards,
    Anil

  • Link between schedule Line Number and Delivery

    Is there a link between Schedule line Number and Delivery number ?
    Eg. Line item 10 with quantity 100. 
    has 5 schedule lines..with 5 different delivery dates.
    1 .  quanity 40
    2.   quantity 30
    3.   quantity 20
    4.   quanity  6
    5    quantity  4
    For schedule line 1, 2 deliveries were created,
    one      with quantity 20
    another with quantity 15
    quantity 5 is still not delivered.
    also schedule lines 2,3,4 and 5 are fully delivered.
    Is there any table, FM etc in SAP which will give me the link between the schedule line and delivery number ?
    Total deliveries created : 6. - But which delivery corresponds to which schedule line ?
    Please dont tell me to look VGBEL and VGPOS.. that will just give line item number 10.. I need to get the schedule line number.
    Also, RV_SCHEDULE_CHECK_DELIVERIES --> will give me the delivered quantity against each schedule line.
    My purpose is to create an ontime delivery report .
    a report which list each schedule lines, and tell, how many shipments were late/ontime/early etc..
    and for Late ones, how many days late has to be found.
    this is where i need the delivery.
    No. Of days Late = Actual GI Date - Planned GI Date.
    Actual GI date is in the delivery.
    Any suggestions ?
    Thank you in advance.

    Hi,
    Check in the below link.
    relation between VBEP-ETENR and LIKP-VBELN
    Thanks,
    Sree.

  • Delivery schduline line number in make to order

    Hi all,
    i am doing make to order scenario with 20 strategy group. In sales order we r defining the different delivery schedule lines.when i run the MRP and getting the plan orders for all the FG material and semifinished material, the sale order number and sale order item number is getting updated in production order . Beside these two , delivery schedule line number is not populated and delivery date is not picking correctly in production order.
    please give your valuable suggestion .
    i would be highly thankful to u
    regards
    piyush

    Hi
    When you do the MRP Run at MD02, maintain the Delivery Schedules as 3 (schedule lines), so when ever you do the MRP Run, it will run along with the delievry date.
    reward if it helps
    Regards
    Prasanna R

  • Schedule line number determination - Schedule line category CP(MRP)

    Hello All,
    I want to know on what basis schedule line numbers getting determined.
    Schedule line category: CP-MRP
    Sales order line items getting confirmed based on the Planned order--> production order created through MRP run.
    I have created sales order line item 1 with 100 quantities. for example I created today. RDD also today.
    3 production order created.
    Those production orders confirmation date as below.
    Production order 1 - 60 quantities - 14.04.2014
    Production order 2 - 30 quantities - 16.04.2014
    Production order 3: 10 quantities - 18.02.2014.
    There are four schedule lines for the line item 1.
    All the 4 lines showed as per the confirmation date order.
    But the schedule line numbers are not as per the above order.
    For example,
    Schedule line number   ----- delivery date ----- Confirmed qty
    1.                                         09.04.2014            0
    3.                                         14.04.2014            60
    2                                          16.04.2014           30
    4                                          18.04.2014            10
    On what basis this schedule numbers getting determined? Is there any standard procedure ?
    Why schedule line numbers not inline with the confirmed date?
    Let me know if you need more information.
    Thank you.
    Regards,
    Rakkimuthu C

    Hi,
    Schedule line number is the number that uniquely identifies the schedule line .
    Use When an item has more than one schedule line, the system automatically assigns a unique number to each line. The number is displayed in the details screens for schedule lines.
    Note The schedule line number serves internal purposes and does not, for example, determine the sequence of schedule lines in the overview screen. The schedule lines on the overview screen are sorted by date.
    The schedule line number will get created automatically by the system. I hope this will clarify your doubt. Thanking you.

  • Line Number in JTextPane

    Hi Experts;
    How do I add a caret listener on this code so that it will just add a number
    when the user goes to the next line.
    import java.awt.*;
    import javax.swing.*;
    public class LineNumber extends JComponent
         private final static Color DEFAULT_BACKGROUND = new Color(213, 213, 234);
         private final static Color DEFAULT_FOREGROUND = Color.white;
         private final static Font DEFAULT_FONT = new Font("arial", Font.PLAIN, 11);
         // LineNumber height (abends when I use MAX_VALUE)
         private final static int HEIGHT = Integer.MAX_VALUE - 1000000;
         // Set right/left margin
         private final static int MARGIN = 5;
         // Line height of this LineNumber component
         private int lineHeight;
         // Line height of this LineNumber component
         private int fontLineHeight;
         // With of the LineNumber component
         private int currentRowWidth;
         // Metrics of this LineNumber component
         private FontMetrics fontMetrics;
          * Convenience constructor for Text Components
         public LineNumber(JComponent component)
              if (component == null)
                   setBackground( DEFAULT_BACKGROUND );
                   setForeground( DEFAULT_FOREGROUND );
                   setFont( DEFAULT_FONT );
              else
                   setBackground( DEFAULT_BACKGROUND );
                   setForeground( DEFAULT_FOREGROUND );
                   setFont( component.getFont() );
              setPreferredSize( 99 );
         public void setPreferredSize(int row)
              int width = fontMetrics.stringWidth( String.valueOf(row) );
              if (currentRowWidth < width)
                   currentRowWidth = width;
                   setPreferredSize( new Dimension(2 * MARGIN + width, HEIGHT) );
         public void setFont(Font font)
              super.setFont(font);
              fontMetrics = getFontMetrics( getFont() );
              fontLineHeight = fontMetrics.getHeight();
          * The line height defaults to the line height of the font for this
          * component. The line height can be overridden by setting it to a
          * positive non-zero value.
         public int getLineHeight()
              if (lineHeight == 0)
                   return fontLineHeight;
              else
                   return lineHeight;
         public void setLineHeight(int lineHeight)
              if (lineHeight > 0)
                   this.lineHeight = lineHeight;
         public int getStartOffset()
              return 4;
         public void paintComponent(Graphics g)
               int lineHeight = getLineHeight();
               int startOffset = getStartOffset();
               Rectangle drawHere = g.getClipBounds();
               g.setColor( getBackground() );
               g.fillRect(drawHere.x, drawHere.y, drawHere.width, drawHere.height);
               g.setColor( getForeground() );
               int startLineNumber = (drawHere.y / lineHeight) + 1;
               int endLineNumber = startLineNumber + (drawHere.height / lineHeight);
               int start = (drawHere.y / lineHeight) * lineHeight + lineHeight - startOffset;
               for (int i = startLineNumber; i <= endLineNumber; i++)
               String lineNumber = String.valueOf(i);
               int width = fontMetrics.stringWidth( lineNumber );
               g.drawString(lineNumber, MARGIN + currentRowWidth - width, start);
               start += lineHeight;
               setPreferredSize( endLineNumber );
    } Thanks for your time . . .
    The_Developer

    Here's what I use. It behaves correctly WRT wrapped lines, and should work equally well with a JTextArea or a JTextPane.
    import java.awt.Color;
    import java.awt.Dimension;
    import java.awt.Font;
    import java.awt.FontMetrics;
    import java.awt.Graphics;
    import java.awt.Rectangle;
    import java.awt.event.ComponentAdapter;
    import java.awt.event.ComponentEvent;
    import java.beans.PropertyChangeEvent;
    import java.beans.PropertyChangeListener;
    import javax.swing.BorderFactory;
    import javax.swing.JComponent;
    import javax.swing.SizeSequence;
    import javax.swing.UIManager;
    import javax.swing.event.DocumentEvent;
    import javax.swing.event.DocumentListener;
    import javax.swing.text.BadLocationException;
    import javax.swing.text.Document;
    import javax.swing.text.Element;
    import javax.swing.text.JTextComponent;
    * LineNumberView is a simple line-number gutter that works correctly
    * even when lines are wrapped in the associated text component.  This
    * is meant to be used as the RowHeaderView in a JScrollPane that
    * contains the associated text component.  Example usage:
    *<pre>
    *   JTextArea ta = new JTextArea();
    *   ta.setLineWrap(true);
    *   ta.setWrapStyleWord(true);
    *   JScrollPane sp = new JScrollPane(ta);
    *   sp.setRowHeaderView(new LineNumberView(ta));
    *</pre>
    * @author Alan Moore
    public class LineNumberView extends JComponent
      // This is for the border to the right of the line numbers.
      // There's probably a UIDefaults value that could be used for this.
      private static final Color BORDER_COLOR = Color.GRAY;
      private static final int WIDTH_TEMPLATE = 99999;
      private static final int MARGIN = 5;
      private FontMetrics viewFontMetrics;
      private int maxNumberWidth;
      private int componentWidth;
      private int textTopInset;
      private int textFontAscent;
      private int textFontHeight;
      private JTextComponent text;
      private SizeSequence sizes;
      private int startLine = 0;
      private boolean structureChanged = true;
       * Construct a LineNumberView and attach it to the given text component.
       * The LineNumberView will listen for certain kinds of events from the
       * text component and update itself accordingly.
       * @param startLine the line that changed, if there's only one
       * @param structureChanged if <tt>true</tt>, ignore the line number and
       *     update all the line heights.
      public LineNumberView(JTextComponent text)
        if (text == null)
          throw new IllegalArgumentException("Text component cannot be null");
        this.text = text;
        updateCachedMetrics();
        UpdateHandler handler = new UpdateHandler();
        text.getDocument().addDocumentListener(handler);
        text.addPropertyChangeListener(handler);
        text.addComponentListener(handler);
        setBorder(BorderFactory.createMatteBorder(0, 0, 0, 1, BORDER_COLOR));
       * Schedule a repaint because one or more line heights may have changed.
       * @param startLine the line that changed, if there's only one
       * @param structureChanged if <tt>true</tt>, ignore the line number and
       *     update all the line heights.
      private void viewChanged(int startLine, boolean structureChanged)
        this.startLine = startLine;
        this.structureChanged = structureChanged;
        revalidate();
        repaint();
      /** Update the line heights as needed. */
      private void updateSizes()
        if (startLine < 0)
          return;
        if (structureChanged)
          int count = getAdjustedLineCount();
          sizes = new SizeSequence(count);
          for (int i = 0; i < count; i++)
            sizes.setSize(i, getLineHeight(i));
          structureChanged = false;
        else
          sizes.setSize(startLine, getLineHeight(startLine));
        startLine = -1;
      /* Copied from javax.swing.text.PlainDocument */
      private int getAdjustedLineCount()
        // There is an implicit break being modeled at the end of the
        // document to deal with boundary conditions at the end.  This
        // is not desired in the line count, so we detect it and remove
        // its effect if throwing off the count.
        Element map = text.getDocument().getDefaultRootElement();
        int n = map.getElementCount();
        Element lastLine = map.getElement(n - 1);
        if ((lastLine.getEndOffset() - lastLine.getStartOffset()) > 1)
          return n;
        return n - 1;
       * Get the height of a line from the JTextComponent.
       * @param index the line number
       * @param the height, in pixels
      private int getLineHeight(int index)
        int lastPos = sizes.getPosition(index) + textTopInset;
        int height = textFontHeight;
        try
          Element map = text.getDocument().getDefaultRootElement();
          int lastChar = map.getElement(index).getEndOffset() - 1;
          Rectangle r = text.modelToView(lastChar);
          height = (r.y - lastPos) + r.height;
        catch (BadLocationException ex)
          ex.printStackTrace();
        return height;
       * Cache some values that are used a lot in painting or size
       * calculations. Also ensures that the line-number font is not
       * larger than the text component's font (by point-size, anyway).
      private void updateCachedMetrics()
        Font textFont = text.getFont();
        FontMetrics fm = getFontMetrics(textFont);
        textFontHeight = fm.getHeight();
        textFontAscent = fm.getAscent();
        textTopInset = text.getInsets().top;
        Font viewFont = getFont();
        boolean changed = false;
        if (viewFont == null)
          viewFont = UIManager.getFont("Label.font");
          changed = true;
        if (viewFont.getSize() > textFont.getSize())
          viewFont = viewFont.deriveFont(textFont.getSize2D());
          changed = true;
        viewFontMetrics = getFontMetrics(viewFont);
        maxNumberWidth = viewFontMetrics.stringWidth(String.valueOf(WIDTH_TEMPLATE));
        componentWidth = 2 * MARGIN + maxNumberWidth;
        if (changed)
          super.setFont(viewFont);
      public Dimension getPreferredSize()
        return new Dimension(componentWidth, text.getHeight());
      public void setFont(Font font)
        super.setFont(font);
        updateCachedMetrics();
      public void paintComponent(Graphics g)
        updateSizes();
        Rectangle clip = g.getClipBounds();
        g.setColor(getBackground());
        g.fillRect(clip.x, clip.y, clip.width, clip.height);
        g.setColor(getForeground());
        int base = clip.y - textTopInset;
        int first = sizes.getIndex(base);
        int last = sizes.getIndex(base + clip.height);
        String text = "";
        for (int i = first; i <= last; i++)
          text = String.valueOf(i+1);
          int x = MARGIN + maxNumberWidth - viewFontMetrics.stringWidth(text);
          int y = sizes.getPosition(i) + textFontAscent + textTopInset;
          g.drawString(text, x, y);
      class UpdateHandler extends ComponentAdapter
          implements PropertyChangeListener, DocumentListener
         * The text component was resized. 'Nuff said.
        public void componentResized(ComponentEvent evt)
          viewChanged(0, true);
         * A bound property was changed on the text component. Properties
         * like the font, border, and tab size affect the layout of the
         * whole document, so we invalidate all the line heights here.
        public void propertyChange(PropertyChangeEvent evt)
          Object oldValue = evt.getOldValue();
          Object newValue = evt.getNewValue();
          String propertyName = evt.getPropertyName();
          if ("document".equals(propertyName))
            if (oldValue != null && oldValue instanceof Document)
              ((Document)oldValue).removeDocumentListener(this);
            if (newValue != null && newValue instanceof Document)
              ((Document)newValue).addDocumentListener(this);
          updateCachedMetrics();
          viewChanged(0, true);
         * Text was inserted into the document.
        public void insertUpdate(DocumentEvent evt)
          update(evt);
         * Text was removed from the document.
        public void removeUpdate(DocumentEvent evt)
          update(evt);
         * Text attributes were changed.  In a source-code editor based on
         * StyledDocument, attribute changes should be applied automatically
         * in response to inserts and removals.  Since we're already
         * listening for those, this method should be redundant, but YMMV.
        public void changedUpdate(DocumentEvent evt)
    //      update(evt);
         * If the edit was confined to a single line, invalidate that
         * line's height.  Otherwise, invalidate them all.
        private void update(DocumentEvent evt)
          Element map = text.getDocument().getDefaultRootElement();
          int line = map.getElementIndex(evt.getOffset());
          DocumentEvent.ElementChange ec = evt.getChange(map);
          viewChanged(line, ec != null);
    }

  • Line number in JEditorPane

    I would like to know the line number of the current caret position in a JEditorPane. The getLineOfOffset(int offset) method in JTextArea offers exactly what I want. How come there's no method to find out about line number in JEditorPane?
    As a workaround, I copied the Swing code from the JTextArea.getLineOfOffset method and used it in my class which extends from JEditorPane. It seems to work fine, but it feels like a bad hack. Will the JTextArea code always work in JEditorPane? Any alternatives? I just think that it's tedious and inefficient to deal with StringTokenizer or manually searching for new line charactors on CaretEvent's.
        public int getLineOfOffset(int offset) throws BadLocationException {
            Document doc = getDocument();
            if (offset < 0) {
                throw new BadLocationException("Can't translate offset to line", -1);
            } else if (offset > doc.getLength()) {
                throw new BadLocationException("Can't translate offset to line", doc.getLength()+1);
            } else {
                Element map = getDocument().getDefaultRootElement();
                return map.getElementIndex(offset);
        }

    It's not a hack. Any document used with a Swing text component is supposed to have the same basic element structure, i.e., a default root element whose children represent logical lines. It's just that with some kinds of documents, like HTML, line numbers don't really mean anything. But JTextArea is hard-coded to use a PlainDocument, which means a logical line always represents a paragraph (or a line of code, or something meaningful), so it made sense for it to provide those convenience methods.

  • Line number in a *.class file, please help, advanced language guys

    dear all,
    i use c++ to open a *.class file and try to read line number of code in the file, i have 2 questions:
    1. i read line number in a method successfully, but i can not understand the meaning of start_pc, following are one of those data, please explain:
    s = start_pc,n = line_number
    s , n
    0 , 123
    8 , 125
    23 , 126
    29 , 127
    34 , 129
    38 , 130
    2. i can not find where the class's line number are, i.e. class start line and class end line, or field's line number.
    does these info exist inside a *.class file?
    thx for any light

    jdb gets line number of fields from class file, not
    source file definitely.I'm not really sure how you tested this, but here's my test, and JDB definitely gets its listing from the source file.
    First, I created and compiled class Tester:
    public class Tester
        public static void main( String[] argv )
        throws Exception
            Tester x = new Tester();
            System.out.println(x.toString());
        int     x;
        int     y;
        private Tester()
            x = 0;
            y = 1;
    }Then, I ran this in JDB. Note lines 16 and 17 in the output from "list":
    H:\Workspace>jdb Tester
    Initializing jdb ...
    stop in Tester.mainDeferring breakpoint Tester.main.
    It will be set after the class is loaded.
    runrun Tester
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Tester.main
    Breakpoint hit: "thread=main", Tester.main(), line=12 bci=0
    12            Tester x = new Tester();
    main[1] list
    8    {
    9        public static void main( String[] argv )
    10        throws Exception
    11        {
    12 =>         Tester x = new Tester();
    13            System.out.println(x.toString());
    14        }
    15
    16        int     x;
    17        int     y;
    main[1] quit
    Tester@b82368Then I edited the source file. Again, look at lines 16 and 17:
    H:\Workspace>jdb Tester
    Initializing jdb ...
    stop in Tester.mainDeferring breakpoint Tester.main.
    It will be set after the class is loaded.
    runrun Tester
    Set uncaught java.lang.Throwable
    Set deferred uncaught java.lang.Throwable
    >
    VM Started: Set deferred breakpoint Tester.main
    Breakpoint hit: "thread=main", Tester.main(), line=12 bci=0
    12            Tester x = new Tester();
    main[1] list
    8    {
    9        public static void main( String[] argv )
    10        throws Exception
    11        {
    12 =>         Tester x = new Tester();
    13            System.out.println(x.toString());
    14        }
    15
    16        int     a;
    17        int     b;
    main[1]

Maybe you are looking for

  • Problem with line clipping.

    Hi, In my applications there are various shapes and there is a Line Handle associated with every shape. That line handle's initial point is center of the shape and the end point is outside the shape. I am using g2d.clip() method to clip the line insi

  • Payment media file not saved on the local PC in FBPM

    Dear all, In transaction FBPM, if I choose the option ouput to the file system and point out the path to the folder where the file to be generated on my local PC, by the running of the transaction I am getting the following error: BFIBL02182 - The fi

  • Discount value not updating at contract header level

    Dear Friends I am facing problem of updating discount value at contract header level. The scenario is u2026. my client used to provide certain service to their customer. For that they maintain quantity contract & bill them as per billing plan. When c

  • Punctuation dissapears when exporting to PDF in CS4 w/Snow Leopard

    Hi All, Since I upgraded to Snow Leopard last week, when I export to a PDF document various punctuation (En-Dashes, Apostrophes etc) do not appear on the PDFs. I have tried exporting to various PDF formats (X/1a etc) but they do not appear, either on

  • Reducing AI file size, without converting to another file type CS6

    I designed artwork for a large banner (84" x 32") so my AI artboard is that large. As you can imagine, with all the text and graphics I used, this file size is 22.8 MB. I need to email this art to the printer, but the file size is too large to email.