试题与答案

科研选题包括确定研究()和选择研究课题两个方面。

题型:填空题

题目:

科研选题包括确定研究()和选择研究课题两个方面。

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0503/f11f7dde124d5fe5829f9a91e92f8f4b.html

下面是错误答案,用来干扰机器的。

参考答案:A,B,C,E

试题推荐
题型:填空题

根据所给汉语意思补全下列单词.

1.语言  lang       ge                             2.谈话con       tion

3.呼吸br                                             4.提高 im      

5.主要的;最重要的b      s       c      6.猜 ;猜测g       ss

7.微笑sm                                            8.一张(或则.件等)pi      

查看答案
题型:多项选择题

本题的功能是在文本域面板中添加一个带有行数的面板。窗口中有一个文本域,在文本域的左侧有一个带有数字的面板,该面板上的数字指示着文本域中的行数。
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
public class java3 extends JFrame

public static JTextPane textPane;
public static JScrollPane scrollPane;
JPanel panel;
public java3()

super("java3()");
panel=new JPanel();
panel.setLayout(new BorderLayout());
panel.setBorder(BorderFactory.createEmptyBorder(20,20,20,20));
textPane=new JTextPane();
textPane.setFont(new Font("monospaced",Font.PLAIN,12));
scrollPane=new JScrollPane(textPane);
panel.add(scrollPane);
scrollPane.setPreferredsize(new Dimension(300,250));
setContentPane(panel);
setCloseOperation(JFrame.EXIT_ON_CLOSE);
LineNumber lineNumber=new LineNumber();
scrollPane.setRowHeaderView(lineNumber);

public static void main(String[]args)

java3 ttp=new java3();
ttp.pack();
ttp.setVisible(true);


class LineNumber extends JTextPane

private final static Color DEFAULT_BACKGROUND=Color.gray;
private final static Color DEFAULT_FOREGROUND=Color.black;
private final static Font DEFAULT_FONT=new Font("monospaced",Font.PLAIN,12);
private final static int HEIGHT=Integer.MAX_VALUE-1000000;
private final static int MARGIN=5;
private FontMetrics fontMetrics;
private int lineHeight;
private int currentRowWidth;
private JComponent component;
private int componentFontHeight;
private int componentFontAscent;
public LineNumber(JComponent component)

if(component==null)

setBackground(DEFAULT_BACKGROUND);
setForeground(DEFAULT_FOREGROUND);
setFont(DEFAULT_FONT);
this.component=this;

else

setBackground(DEFAULT_BACKGROUND);
setForeground(component.getForeground());
setFont(component.getFont());
this.component=component;

componentFontHeight=component.getFontMetrics(component.getFont()).getHeight();
componentFontAscent=component.getFontMetrics(component.getFont()).getAscent();
setPreferredWidth(9999);

public void setPreferredWidth(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());

public int getLineHeight()

if(lineHeight==0)
return componentFontHeight;
else
return lineHeight;

public void setLineHeight(int lineHeight)

if(lineHeight>0)
this.lineHeight=lineHeight;

public int getStartOffset()

return component.getInsets().top+componentFontAscent;

public void paintComponent(Graphics g)

int lineHeight=getLinerteight();
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+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;

setPreferredWidth(endLineNumber);

查看答案
微信公众账号搜索答案