我告诉tabularx
将表格重新调整为\textwidth
,但它不起作用(\linewidth
也不起作用)。如果减小字体大小以达到期望的结果就可以了!
有趣的是,第一个\hline
和最后一个\textwidth
的大小已调整为\begin{table}[h!]
\centering
\caption{asdf}
\begin{tabularx}{\linewidth}{ccllllllll}
\hline
& & \multicolumn{4}{c}{X = Gini} & \multicolumn{4}{c}{X = Selfishness} \\ \cline{3-10}
Treatment & Round & \multicolumn{2}{c}{WMW} & \multicolumn{2}{c}{Schlag} & \multicolumn{2}{c}{WMW} & \multicolumn{2}{c}{Schlag} \\
& & \multicolumn{1}{c}{reduced} & \multicolumn{1}{c}{full} & \multicolumn{1}{c}{reduced} & \multicolumn{1}{c}{full} & \multicolumn{1}{c}{reduced} & \multicolumn{1}{c}{full} & \multicolumn{1}{c}{reduced} & \multicolumn{1}{c}{full} \\ \cline{3-10}
\multirow{3}{*}{1} & 1 & .123*** & .123*** & .123*** & .123*** & .123*** & .123*** & .123*** & .123*** \\
& 2 & .123** & .123** & .123** & .123** & .123** & .123** & .123** & .123** \\
& 3 & .123* & .123* & .123* & .123* & .123* & .123* & .123* & .123* \\
\multirow{3}{*}{2} & 1 & .123 & .123 & .123 & .123 & .123 & .123 & .123 & .123 \\
& 2 & .123 & .123 & .123 & .123 & .123 & .123 & .123 & .123 \\
& 3 & .123 & .123 & .123 & .123 & .123 & .123 & .123 & .123 \\
\hline
\end{tabularx}
\end{table}
,但表的其余部分却没有(参见图片)。
任何帮助,我们将不胜感激。下面找到我示例的代码:
private void jButton1_LogInActionPerformed(java.awt.event.ActionEvent evt) {
Connection con = MyConnection.getConnection();
PreparedStatement ps;
try {
ps=con.prepareStatement("Select * from agent WHERE User_Name = ? AND Password = ?");
ps.setString(1, jTextField1_UserName.getText());
ps.setString(2, String.valueOf(jPasswordField1.getPassword()));
ResultSet rs = ps.executeQuery();
String Name = jTextField1_UserName.getText();
if(rs.next())
{
String First_Name = rs.getString("First_Name");
if(Name.equals(First_Name))
{
Agent_Info ag_info = new Agent_Info();
ag_info.setVisible(true);
ag_info.pack();
ag_info.setLocationRelativeTo(null);
this.dispose();
//System.out.println("Yes");
}
}
} catch (SQLException ex) {
Logger.getLogger(LoginForm.class.getName()).log(Level.SEVERE, null, ex);
}
答案 0 :(得分:0)
X
的列,不适用于l
或c
列\multicolumn{1}{c}{...}
没有用\documentclass{article}
\usepackage{tabularx}
\usepackage{graphicx}
\usepackage{booktabs}
\usepackage{multirow}
\begin{document}
\begin{table}[htbp]
\centering
\scriptsize
\caption{asdf}
\begin{tabularx}{\linewidth}{XXXXXXXXXX}
\hline
& & \multicolumn{4}{c}{X = Gini} & \multicolumn{4}{c}{X = Selfishness} \\ \cline{3-10}
Treat. & Round & \multicolumn{2}{c}{WMW} & \multicolumn{2}{c}{Schlag} & \multicolumn{2}{c}{WMW} & \multicolumn{2}{c}{Schlag} \\
& & reduced & full & reduced & full & reduced & full & reduced & full \\ \cline{3-10}
\multirow{3}{*}{1} & 1 & .123*** & .123*** & .123*** & .123*** & .123*** & .123*** & .123*** & .123*** \\
& 2 & .123** & .123** & .123** & .123** & .123** & .123** & .123** & .123** \\
& 3 & .123* & .123* & .123* & .123* & .123* & .123* & .123* & .123* \\
\multirow{3}{*}{2} & 1 & .123 & .123 & .123 & .123 & .123 & .123 & .123 & .123 \\
& 2 & .123 & .123 & .123 & .123 & .123 & .123 & .123 & .123 \\
& 3 & .123 & .123 & .123 & .123 & .123 & .123 & .123 & .123 \\
\hline
\end{tabularx}
\end{table}
\end{document}