Form file is invalid: wrong row: 1

已回答

I was editing my swing form screen, then it suddenly disappeared and I got this message "Form file is invalid: wrong row: 1" showing instead. I have absolutely no clue on what is going on.

 

This is what the form file itself looks right now:

<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="view.MainScreen">
  <grid id="27dc6" binding="root" layout-manager="GridLayoutManager" row-count="5" column-count="5" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
    <margin top="0" left="0" bottom="0" right="0"/>
    <constraints>
      <xy x="20" y="20" width="900" height="800"/>
    </constraints>
    <properties>
      <minimumSize width="900" height="800"/>
      <preferredSize width="900" height="800"/>
    </properties>
    <border type="none"/>
    <children>
      <grid id="5fb28" binding="titleBar" layout-manager="GridLayoutManager" row-count="5" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
        <margin top="0" left="0" bottom="0" right="0"/>
        <constraints>
          <grid row="0" column="0" row-span="1" col-span="5" vsize-policy="0" hsize-policy="2" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
        </constraints>
        <properties>
          <background color="-16737946"/>
        </properties>
        <border type="none"/>
        <children>
          <component id="94cd8" class="javax.swing.JLabel" binding="title">
            <constraints>
              <grid row="1" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
            </constraints>
            <properties>
              <font name="Noto Sans" size="36"/>
              <foreground color="-1"/>
              <icon value="tick.png"/>
              <iconTextGap value="10"/>
              <text value="Todo App"/>
            </properties>
          </component>
          <hspacer id="318bc">
            <constraints>
              <grid row="1" column="2" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
            </constraints>
          </hspacer>
          <vspacer id="8d5aa">
            <constraints>
              <grid row="4" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false">
                <minimum-size width="-1" height="20"/>
              </grid>
            </constraints>
          </vspacer>
          <hspacer id="1b036">
            <constraints>
              <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="2" anchor="0" fill="1" indent="0" use-parent-layout="false">
                <minimum-size width="20" height="-1"/>
              </grid>
            </constraints>
          </hspacer>
          <component id="d55a1" class="javax.swing.JLabel" binding="subheading">
            <constraints>
              <grid row="3" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
            </constraints>
            <properties>
              <font name="Noto Sans" size="16" style="0"/>
              <foreground color="-1"/>
              <text value="Write everything. Forget nothing."/>
            </properties>
          </component>
          <vspacer id="dc512">
            <constraints>
              <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false">
                <minimum-size width="-1" height="20"/>
              </grid>
            </constraints>
          </vspacer>
          <vspacer id="84126">
            <constraints>
              <grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false">
                <minimum-size width="-1" height="10"/>
              </grid>
            </constraints>
          </vspacer>
        </children>
      </grid>
      <grid id="46a90" binding="addProjectPanel" layout-manager="GridLayoutManager" row-count="1" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
        <margin top="10" left="0" bottom="10" right="0"/>
        <constraints>
          <grid row="2" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false">
            <preferred-size width="202" height="56"/>
          </grid>
        </constraints>
        <properties>
          <background color="-1"/>
        </properties>
        <border type="none"/>
        <children>
          <component id="ab47a" class="javax.swing.JLabel" binding="projectsHeader">
            <constraints>
              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="1" use-parent-layout="false"/>
            </constraints>
            <properties>
              <font name="Noto Sans" size="22" style="1"/>
              <foreground color="-16737946"/>
              <text value="Projects"/>
            </properties>
          </component>
          <hspacer id="c3ede">
            <constraints>
              <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
            </constraints>
          </hspacer>
          <component id="7ace1" class="javax.swing.JLabel" binding="addProjectButton">
            <constraints>
              <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
            </constraints>
            <properties>
              <icon value="add.png"/>
              <text value=""/>
            </properties>
          </component>
          <hspacer id="fed91">
            <constraints>
              <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="1" hsize-policy="2" anchor="0" fill="1" indent="0" use-parent-layout="false">
                <minimum-size width="20" height="-1"/>
              </grid>
            </constraints>
          </hspacer>
        </children>
      </grid>
      <grid id="7244e" binding="addTaskPanel" layout-manager="GridLayoutManager" row-count="1" column-count="4" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
        <margin top="0" left="0" bottom="0" right="0"/>
        <constraints>
          <grid row="2" column="3" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
        </constraints>
        <properties>
          <background color="-1"/>
        </properties>
        <border type="none"/>
        <children>
          <component id="f819f" class="javax.swing.JLabel" binding="tasksHeader">
            <constraints>
              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="1" use-parent-layout="false"/>
            </constraints>
            <properties>
              <font name="Noto Sans" size="22" style="1"/>
              <foreground color="-16737946"/>
              <text value="Tasks"/>
            </properties>
          </component>
          <hspacer id="762ea">
            <constraints>
              <grid row="0" column="1" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
            </constraints>
          </hspacer>
          <component id="df120" class="javax.swing.JLabel" binding="addTaskButton">
            <constraints>
              <grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
            </constraints>
            <properties>
              <icon value="add.png"/>
              <text value=""/>
            </properties>
          </component>
          <hspacer id="fafa5">
            <constraints>
              <grid row="0" column="3" row-span="1" col-span="1" vsize-policy="1" hsize-policy="2" anchor="0" fill="1" indent="0" use-parent-layout="false">
                <minimum-size width="20" height="-1"/>
              </grid>
            </constraints>
          </hspacer>
        </children>
      </grid>
      <grid id="cfbd9" binding="projectListPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
        <margin top="10" left="0" bottom="0" right="5"/>
        <constraints>
          <grid row="4" column="1" row-span="1" col-span="1" vsize-policy="3" hsize-policy="0" anchor="0" fill="3" indent="0" use-parent-layout="false">
            <preferred-size width="202" height="59"/>
          </grid>
        </constraints>
        <properties>
          <background color="-1"/>
        </properties>
        <border type="none"/>
        <children>
          <component id="73edf" class="javax.swing.JList" binding="projectList">
            <constraints>
              <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="2" anchor="0" fill="3" indent="1" use-parent-layout="false">
                <preferred-size width="150" height="50"/>
              </grid>
            </constraints>
            <properties>
              <background color="-1"/>
              <fixedCellHeight value="40"/>
              <font name="Noto Sans" size="16" style="1"/>
              <model/>
              <selectionBackground color="-16737946"/>
              <selectionForeground color="-1"/>
              <selectionMode value="0"/>
            </properties>
          </component>
        </children>
      </grid>
      <grid id="6f25b" binding="taskListPanel" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
        <margin top="0" left="0" bottom="0" right="0"/>
        <constraints>
          <grid row="4" column="3" row-span="1" col-span="1" vsize-policy="3" hsize-policy="2" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
        </constraints>
        <properties>
          <background color="-1"/>
        </properties>
        <border type="none"/>
        <children>
          <grid id="f8ea" binding="emptyTaskList" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
            <margin top="0" left="0" bottom="0" right="0"/>
            <constraints>
              <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
            </constraints>
            <properties>
              <visible value="false"/>
            </properties>
            <border type="none"/>
            <children>
              <component id="fbe2a" class="javax.swing.JLabel" binding="emptyListIcon">
                <constraints>
                  <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false">
                    <preferred-size width="196" height="-1"/>
                  </grid>
                </constraints>
                <properties>
                  <font name="Noto Sans" size="18" style="1"/>
                  <foreground color="-16737946"/>
                  <horizontalAlignment value="0"/>
                  <horizontalTextPosition value="0"/>
                  <icon value="lists.png"/>
                  <iconTextGap value="15"/>
                  <text value="You have no tasks here :D"/>
                  <verticalAlignment value="0"/>
                  <verticalTextPosition value="3"/>
                </properties>
              </component>
              <component id="de0b1" class="javax.swing.JLabel" binding="emptyListSubheading">
                <constraints>
                  <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="2" hsize-policy="0" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
                </constraints>
                <properties>
                  <font name="Noto Sans" size="18" style="1"/>
                  <foreground color="-6579301"/>
                  <horizontalAlignment value="0"/>
                  <horizontalTextPosition value="0"/>
                  <text value="Click the &quot;+&quot; button to add a new task"/>
                  <verticalAlignment value="1"/>
                </properties>
              </component>
            </children>
          </grid>
        </children>
      </grid>
    </children>
  </grid>
</form>

 

0

Hello,

I've reproduced the problem and raised a new issue for the responsible developer in YouTrack. Please follow https://youtrack.jetbrains.com/issue/IDEA-296508 for updates.

0

请先登录再写评论。